warn about online keybackup and default to off

This commit is contained in:
Nicolas Werner 2021-08-25 23:36:13 +02:00
parent d97e408c98
commit 23697e28a3
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -124,7 +124,7 @@ UserSettings::load(std::optional<QString> profile)
.toBool(); .toBool();
onlyShareKeysWithVerifiedUsers_ = onlyShareKeysWithVerifiedUsers_ =
settings.value(prefix + "user/only_share_keys_with_verified_users", false).toBool(); 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_ = disableCertificateValidation_ =
settings.value("disable_certificate_validation", false).toBool(); 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) { 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); settings_->setUseOnlineKeyBackup(enabled);
}); });