summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-08-25 23:36:13 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-08-26 03:43:51 +0200
commit23697e28a3f26b683a4fab309bb700f625414cd5 (patch)
tree1ab0a4f9808bf2c7857cc89a2f9d5729d6565370
parentMerge pull request #697 from harmathy/master (diff)
downloadnheko-23697e28a3f26b683a4fab309bb700f625414cd5.tar.xz
warn about online keybackup and default to off
-rw-r--r--src/UserSettingsPage.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/UserSettingsPage.cpp b/src/UserSettingsPage.cpp
index ab1e442c..82b29456 100644
--- a/src/UserSettingsPage.cpp
+++ b/src/UserSettingsPage.cpp
@@ -124,7 +124,7 @@ UserSettings::load(std::optional<QString> profile)
             .toBool();
         onlyShareKeysWithVerifiedUsers_ =
           settings.value(prefix + "user/only_share_keys_with_verified_users", false).toBool();
-        useOnlineKeyBackup_ = settings.value(prefix + "user/online_key_backup", true).toBool();
+        useOnlineKeyBackup_ = settings.value(prefix + "user/online_key_backup", false).toBool();
 
         disableCertificateValidation_ =
           settings.value("disable_certificate_validation", false).toBool();
@@ -1228,6 +1228,17 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
         });
 
         connect(useOnlineKeyBackup_, &Toggle::toggled, this, [this](bool enabled) {
+                if (enabled) {
+                        if (QMessageBox::question(
+                              this,
+                              tr("Enable online key backup"),
+                              tr("The Nheko authors recommend not enabling online key backup until "
+                                 "symmetric online key backup is available. Enable anyway?")) !=
+                            QMessageBox::StandardButton::NoButton) {
+                                useOnlineKeyBackup_->setState(false);
+                                return;
+                        }
+                }
                 settings_->setUseOnlineKeyBackup(enabled);
         });