π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Remember Auth's selected tag
Neeraj Gupta153924bb94a4
diff --git a/mobile/apps/auth/changes/remember-selected-tag.md b/mobile/apps/auth/changes/remember-selected-tag.mdnew file mode 100644index 0000000000..de3e7638b8--- /dev/null+++ b/mobile/apps/auth/changes/remember-selected-tag.md@@ -0,0 +1 @@+- Remember the selected tag when reopening the app.diff --git a/mobile/apps/auth/lib/services/preference_service.dart b/mobile/apps/auth/lib/services/preference_service.dartindex d4325cc894..f755af6adc 100644--- a/mobile/apps/auth/lib/services/preference_service.dart+++ b/mobile/apps/auth/lib/services/preference_service.dart@@ -35,6 +35,13 @@ class PreferenceService {_prefs = await SharedPreferences.getInstance();}+ String get lastSelectedTag => _prefs.getString("lastSelectedTag") ?? "";+ set lastSelectedTag(String tag) {+ if (lastSelectedTag != tag) {+ _prefs.setString("lastSelectedTag", tag).ignore();+ }+ }+bool hasShownCoachMark() {if (shouldSkipAuthGuidance) {return true;diff --git a/mobile/apps/auth/lib/ui/home_page.dart b/mobile/apps/auth/lib/ui/home_page.dartindex a2e9904282..7c090c5810 100644--- a/mobile/apps/auth/lib/ui/home_page.dart+++ b/mobile/apps/auth/lib/ui/home_page.dart@@ -111,7 +111,7 @@ class _HomePageState extends State<HomePage> {StreamSubscription<IconsChangedEvent>? _iconsChangedEvent;StreamSubscription<MultiSelectActionRequestedEvent>?_multiSelectActionSubscription;- String selectedTag = "";+ String selectedTag = PreferenceService.instance.lastSelectedTag;bool _isTrashOpen = false;bool hasTrashedCodes = false;bool hasNonTrashedCodes = false;@@ -1142,6 +1142,7 @@ class _HomePageState extends State<HomePage> {}void _applyFilteringAndRefresh() {+ PreferenceService.instance.lastSelectedTag = selectedTag;if (_searchText.isNotEmpty && _showSearchBox && _allCodes != null) {final String val = _searchText.toLowerCase();// Show issuer matches first so searches for an email provider rank its