diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-10-23 16:59:18 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-10-23 16:59:46 +0200 |
commit | 1ab20e0ee318629d37fd8eef92b472750f6f1d5a (patch) | |
tree | 4dedae613be962dbce6164438f9c5c33e67e0287 /src/UserSettingsPage.cpp | |
parent | Reload message on m.room_key (diff) | |
download | nheko-1ab20e0ee318629d37fd8eef92b472750f6f1d5a.tar.xz |
Fix share keys setting not working
Diffstat (limited to 'src/UserSettingsPage.cpp')
-rw-r--r-- | src/UserSettingsPage.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp index 4278180b..5558b246 100644 --- a/src/UserSettingsPage.cpp +++ b/src/UserSettingsPage.cpp @@ -299,6 +299,7 @@ UserSettings::setShareKeysWithTrustedUsers(bool shareKeys) { if (shareKeys == shareKeysWithTrustedUsers_) return; + shareKeysWithTrustedUsers_ = shareKeys; emit shareKeysWithTrustedUsersChanged(shareKeys); save(); @@ -736,6 +737,10 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge emit decryptSidebarChanged(); }); + connect(shareKeysWithTrustedUsers_, &Toggle::toggled, this, [this](bool disabled) { + settings_->setShareKeysWithTrustedUsers(!disabled); + }); + connect(avatarCircles_, &Toggle::toggled, this, [this](bool disabled) { settings_->setAvatarCircles(!disabled); }); @@ -810,6 +815,7 @@ UserSettingsPage::showEvent(QShowEvent *) startInTrayToggle_->setState(!settings_->startInTray()); groupViewToggle_->setState(!settings_->groupView()); decryptSidebar_->setState(!settings_->decryptSidebar()); + shareKeysWithTrustedUsers_->setState(!settings_->shareKeysWithTrustedUsers()); avatarCircles_->setState(!settings_->avatarCircles()); typingNotifications_->setState(!settings_->typingNotifications()); sortByImportance_->setState(!settings_->sortByImportance()); |