fix: resync kill switch mode after backup restore and settings reset

This commit is contained in:
Mitternacht822
2026-02-20 14:42:35 +04:00
parent 02be6dc5f9
commit a06497b380

View File

@@ -242,6 +242,13 @@ void SettingsController::restoreAppConfigFromData(const QByteArray &data)
: m_settings->useAmneziaDns();
emit amneziaDnsToggled(amneziaDnsEnabled);
emit killSwitchEnabledChanged();
if (isKillSwitchEnabled()) {
emit strictKillSwitchEnabledChanged(isStrictKillSwitchEnabled());
} else {
emit strictKillSwitchEnabledChanged(false);
}
emit restoreBackupFinished();
} else {
emit changeSettingsErrorOccurred(tr("Backup file is corrupted"));
@@ -267,6 +274,9 @@ void SettingsController::clearSettings()
toggleAutoStart(false);
emit killSwitchEnabledChanged();
emit strictKillSwitchEnabledChanged(false);
emit changeSettingsFinished(tr("All settings have been reset to default values"));
#if defined(Q_OS_IOS) || defined(MACOS_NE)