summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_userinfo.cpp
diff options
context:
space:
mode:
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);
}