aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/UserInterfaceUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/UserInterfaceUtils.cpp')
-rw-r--r--src/ui/UserInterfaceUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/UserInterfaceUtils.cpp b/src/ui/UserInterfaceUtils.cpp
index 3154aa2b..7e236c02 100644
--- a/src/ui/UserInterfaceUtils.cpp
+++ b/src/ui/UserInterfaceUtils.cpp
@@ -500,14 +500,14 @@ void CommonUtils::AddKey2Favourtie(const GpgKey &key) {
nlohmann::json::array());
}
key_array.push_back(key.GetFingerprint());
- CacheManager::GetInstance().SaveCache("favourite_key_pair", key_array);
+ CacheManager::GetInstance().SaveCache("favourite_key_pair", key_array, true);
}
void CommonUtils::RemoveKeyFromFavourite(const GpgKey &key) {
auto key_array = CacheManager::GetInstance().LoadCache("favourite_key_pair");
if (!key_array.is_array()) {
CacheManager::GetInstance().SaveCache("favourite_key_pair",
- nlohmann::json::array());
+ nlohmann::json::array(), true);
return;
}
auto it = std::find(key_array.begin(), key_array.end(), key.GetFingerprint());