summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_userinfo.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-03-18 18:07:46 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-03-18 18:08:27 +0300
commitc667e8ea5f3f5c513ad5c2f08d2eceebb74bffd4 (patch)
treed5c1394594b485ffec526530e77393efb1b3ebfa /protocols/JabberG/src/jabber_userinfo.cpp
parenta92c14e431e4585038ed59138ecaa52db15da489 (diff)
Jabber: libsignal storage code rework
Diffstat (limited to 'protocols/JabberG/src/jabber_userinfo.cpp')
-rw-r--r--protocols/JabberG/src/jabber_userinfo.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp
index ead3d33009..f340641a3c 100644
--- a/protocols/JabberG/src/jabber_userinfo.cpp
+++ b/protocols/JabberG/src/jabber_userinfo.cpp
@@ -866,17 +866,17 @@ public:
AppendMenu(hMenu, MF_STRING, (UINT_PTR)1, trusted ? TranslateT("Untrust") : TranslateT("Trust"));
AppendMenu(hMenu, MF_STRING | (ses ? 0 : MF_GRAYED), (UINT_PTR)2, TranslateT("Kill session"));
int nReturnCmd = TrackPopupMenu(hMenu, TPM_RETURNCMD, pos->pt.x, pos->pt.y, 0, m_hwnd, nullptr);
- if (nReturnCmd == 1) {
+ switch (nReturnCmd) {
+ case 1:
ppro->setByte(m_hContact, TrustSettingName, !trusted);
+ if (trusted)
+ ppro->delSetting(m_hContact, "OmemoSignalSession_" + suffix);
OnRefresh();
- }
- else if (nReturnCmd == 2) {
- // TODO Purge session in ram
- CMStringA SettingName(FORMAT, "OmemoDeviceId%dChecked", pos->iCurr);
- ppro->delSetting(m_hContact, SettingName);
+ break;
+ case 2:
ppro->delSetting(m_hContact, "OmemoSignalSession_" + suffix);
-
OnRefresh();
+ break;
}
DestroyMenu(hMenu);
}