aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/UserInterfaceUtils.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2023-07-13 07:39:41 +0000
committerSaturneric <[email protected]>2023-07-13 07:39:41 +0000
commit77838db2af8dc4d665cb4dc3d6b30e6d58683091 (patch)
tree62c1bd7251bfc52b6a72f1814093782a0c214231 /src/ui/UserInterfaceUtils.cpp
parentfeat: support instant flush when save cache (diff)
downloadGpgFrontend-77838db2af8dc4d665cb4dc3d6b30e6d58683091.tar.gz
GpgFrontend-77838db2af8dc4d665cb4dc3d6b30e6d58683091.zip
feat: support searching keys
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());