π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[auth] code refactor
Aman Raj Singh Mourya3327b7513344
diff --git a/auth/lib/services/preference_service.dart b/auth/lib/services/preference_service.dartindex 4d5c1bd7ef..45a2cf0e66 100644--- a/auth/lib/services/preference_service.dart+++ b/auth/lib/services/preference_service.dart@@ -27,7 +27,6 @@ class PreferenceService {Future<void> init() async {_prefs = await SharedPreferences.getInstance();- await setAppInstallTime();}bool hasShownCoachMark() {@@ -110,14 +109,9 @@ class PreferenceService {if (_prefs.containsKey(kAppInstallTime)) {return _prefs.getInt(kAppInstallTime)!;} else {- return DateTime.now().millisecondsSinceEpoch;- }- }-- Future<void> setAppInstallTime() async {- if (!_prefs.containsKey(kAppInstallTime)) {- final installedTimeinMillis = DateTime.now().millisecondsSinceEpoch;- await _prefs.setInt(kAppInstallTime, installedTimeinMillis);+ int installedTimeinMillis = DateTime.now().millisecondsSinceEpoch;+ _prefs.setInt(kAppInstallTime, installedTimeinMillis).ignore();+ return installedTimeinMillis;}}}