π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[auth] Fix UX issue on deleting last code from trash
Neeraj Gupta954afd6409a5
diff --git a/auth/lib/l10n/arb/app_en.arb b/auth/lib/l10n/arb/app_en.arbindex 148f386d7f..da434bdc49 100644--- a/auth/lib/l10n/arb/app_en.arb+++ b/auth/lib/l10n/arb/app_en.arb@@ -50,7 +50,7 @@"deleteCodeTitle": "Delete code?","deleteCodeMessage": "Are you sure you want to delete this code? This action is irreversible.","trashCode": "Trash code?",- "trashCodeMessage": "Are you sure you want to trash code for {account}?.",+ "trashCodeMessage": "Are you sure you want to trash code for {account}?","trash": "Trash","viewLogsAction": "View logs","sendLogsDescription": "This will send across logs to help us debug your issue. While we take precautions to ensure that sensitive information is not logged, we encourage you to view these logs before sharing them.",diff --git a/auth/lib/ui/home_page.dart b/auth/lib/ui/home_page.dartindex 48e017e667..3b3636a888 100644--- a/auth/lib/ui/home_page.dart+++ b/auth/lib/ui/home_page.dart@@ -106,12 +106,16 @@ class _HomePageState extends State<HomePage> {void _loadCodes() {CodeStore.instance.getAllCodes().then((codes) {_allCodes = codes;+ hasTrashedCodes = false;for (final c in _allCodes ?? []) {if (c.isTrashed) {hasTrashedCodes = true;break;}}+ if (!hasTrashedCodes) {+ _isTrashOpen = false;+ }CodeDisplayStore.instance.getAllTags(allCodes: _allCodes).then((value) {tags = value;