diff --git a/lib/app/cubits/power_control.dart b/lib/app/cubits/power_control.dart index 2e78abe07..c421e31b8 100644 --- a/lib/app/cubits/power_control.dart +++ b/lib/app/cubits/power_control.dart @@ -13,7 +13,8 @@ class PowerControl extends WatchSelf { bool? _isNetworkEnabled; String? _networkDisabledReason; ConnectivityResult? _lastConnectionType; - bool _syncOnMobile = false; + static final bool _syncOnMobileDefault = true; + bool _syncOnMobile = _syncOnMobileDefault; PowerControl(this._repos, this._settings) { // TODO: Should we unsusbscribe somewhere? @@ -21,7 +22,7 @@ class PowerControl extends WatchSelf { } Future init() async { - _syncOnMobile = _settings.getEnableSyncOnMobile(); + _syncOnMobile = _settings.getEnableSyncOnMobile(_syncOnMobileDefault); final current = await _connectivity.checkConnectivity(); _updateConnectionStatus(current); } diff --git a/lib/app/utils/settings.dart b/lib/app/utils/settings.dart index 6291a332e..8f832990f 100644 --- a/lib/app/utils/settings.dart +++ b/lib/app/utils/settings.dart @@ -73,8 +73,8 @@ class Settings { await _prefs.setBool(_syncOnMobileKey, enable); } - bool getEnableSyncOnMobile() { - return _prefs.getBool(_syncOnMobileKey) ?? false; + bool getEnableSyncOnMobile(bool default_) { + return _prefs.getBool(_syncOnMobileKey) ?? default_; } Future setHighestSeenProtocolNumber(int number) async {