fix retrocompatibilidade

This commit is contained in:
J. A. Messias 2024-10-01 10:47:21 -03:00
parent 014cdcac93
commit a18b97680b
1 changed files with 3 additions and 3 deletions

View File

@ -125,10 +125,10 @@ class StorageUtil {
Future<void> initSharedPreferences() async {
_sharedPreferences.prefs ??= await SharedPreferences.getInstance();
isFirstRun = _sharedPreferences.prefs?.getBool('first_run') ?? true;
isFirstRun = _sharedPreferences.prefs?.getBool('milestone') ?? true;
if (isFirstRun) {
isFirstRun = false;
await _sharedPreferences.prefs?.setBool('first_run', false);
await _sharedPreferences.prefs?.setBool('milestone', false);
_secureStorage.purge();
}
}
@ -186,7 +186,7 @@ class StorageUtil {
bool get isFirstRun => _isFirstRun;
set isFirstRun(bool value) {
_isFirstRun = value;
_sharedPreferences.set('first_run', value, (v) => _isFirstRun = v);
_sharedPreferences.set('milestone', value, (v) => _isFirstRun = v);
}
String? _deviceDescription;