π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Enhance CollectionPage to handle uncategorized collections and update TrashPage UI
AmanRajSinghMourya19a43031f83e
diff --git a/mobile/apps/locker/lib/ui/pages/all_collections_page.dart b/mobile/apps/locker/lib/ui/pages/all_collections_page.dartindex 905f865ed3..9accd7048f 100644--- a/mobile/apps/locker/lib/ui/pages/all_collections_page.dart+++ b/mobile/apps/locker/lib/ui/pages/all_collections_page.dart@@ -396,8 +396,10 @@ class _AllCollectionsPageState extends State<AllCollectionsPage> {Future<void> _openUncategorized() async {await Navigator.of(context).push(MaterialPageRoute(- builder: (context) =>- CollectionPage(collection: _uncategorizedCollection!),+ builder: (context) => CollectionPage(+ collection: _uncategorizedCollection!,+ isUncategorized: true,+ ),),);}diff --git a/mobile/apps/locker/lib/ui/pages/collection_page.dart b/mobile/apps/locker/lib/ui/pages/collection_page.dartindex 61c80bda1f..c7293c173a 100644--- a/mobile/apps/locker/lib/ui/pages/collection_page.dart+++ b/mobile/apps/locker/lib/ui/pages/collection_page.dart@@ -31,10 +31,12 @@ import "package:logging/logging.dart";class CollectionPage extends UploaderPage {final Collection collection;+ final bool isUncategorized;const CollectionPage({super.key,required this.collection,+ this.isUncategorized = false,});@override@@ -372,28 +374,30 @@ class _CollectionPageState extends UploaderPageState<CollectionPage>children: [TitleBarTitleWidget(title: _collection.name ?? context.l10n.untitled,- trailingWidgets: [- GestureDetector(- onTap: () async {- await _shareCollection();- },- child: Container(- height: 48,- width: 48,- decoration: BoxDecoration(- borderRadius: BorderRadius.circular(12),- color: getEnteColorScheme(context).backdropBase,- ),- padding: const EdgeInsets.all(12),- child: HugeIcon(- icon: HugeIcons.strokeRoundedShare08,- color: getEnteColorScheme(context).iconColor,- ),- ),- ),- const SizedBox(width: 8),- _buildMenuButton(),- ],+ trailingWidgets: widget.isUncategorized+ ? const []+ : [+ GestureDetector(+ onTap: () async {+ await _shareCollection();+ },+ child: Container(+ height: 48,+ width: 48,+ decoration: BoxDecoration(+ borderRadius: BorderRadius.circular(12),+ color: getEnteColorScheme(context).backdropBase,+ ),+ padding: const EdgeInsets.all(12),+ child: HugeIcon(+ icon: HugeIcons.strokeRoundedShare08,+ color: getEnteColorScheme(context).iconColor,+ ),+ ),+ ),+ const SizedBox(width: 8),+ _buildMenuButton(),+ ],),Text(_displayedFiles.length.toString(),diff --git a/mobile/apps/locker/lib/ui/pages/trash_page.dart b/mobile/apps/locker/lib/ui/pages/trash_page.dartindex 271666ba3a..936fbc4899 100644--- a/mobile/apps/locker/lib/ui/pages/trash_page.dart+++ b/mobile/apps/locker/lib/ui/pages/trash_page.dart@@ -1,5 +1,6 @@import 'package:ente_ui/components/buttons/button_widget.dart';import 'package:ente_ui/components/buttons/models/button_type.dart';+import "package:ente_ui/components/title_bar_title_widget.dart";import 'package:ente_ui/theme/ente_theme.dart';import 'package:ente_ui/utils/dialog_util.dart';import 'package:flutter/material.dart';@@ -202,18 +203,20 @@ class _TrashPageState extends State<TrashPage> {@overrideWidget build(BuildContext context) {return Scaffold(+ backgroundColor: getEnteColorScheme(context).backgroundBase,appBar: AppBar(- title: Text(context.l10n.trash),- centerTitle: false,- backgroundColor: Theme.of(context).scaffoldBackgroundColor,- foregroundColor: Theme.of(context).textTheme.bodyLarge?.color,- actions: [- IconButton(- icon: const Icon(Icons.delete_sweep),- onPressed: _emptyTrash,- tooltip: context.l10n.emptyTrashTooltip,+ backgroundColor: getEnteColorScheme(context).backgroundBase,+ surfaceTintColor: Colors.transparent,+ toolbarHeight: 48,+ leadingWidth: 48,+ leading: GestureDetector(+ onTap: () {+ Navigator.pop(context);+ },+ child: const Icon(+ Icons.arrow_back_outlined,),- ],+ ),),body: _buildBody(),);@@ -248,9 +251,37 @@ class _TrashPageState extends State<TrashPage> {return Padding(padding: const EdgeInsets.all(16.0),- child: ItemListView(- files: _sortedTrashFiles.cast<EnteFile>(),- fileOverflowActions: _getFileOverflowActions(),+ child: Column(+ children: [+ TitleBarTitleWidget(+ title: context.l10n.trash,+ trailingWidgets: [+ GestureDetector(+ onTap: () async {+ await _emptyTrash();+ },+ child: Container(+ height: 48,+ width: 48,+ decoration: BoxDecoration(+ borderRadius: BorderRadius.circular(12),+ color: getEnteColorScheme(context).backdropBase,+ ),+ padding: const EdgeInsets.all(12),+ child: Icon(+ Icons.delete_outline,+ color: getEnteColorScheme(context).iconColor,+ ),+ ),+ ),+ ],+ ),+ const SizedBox(height: 24),+ ItemListView(+ files: _sortedTrashFiles.cast<EnteFile>(),+ fileOverflowActions: _getFileOverflowActions(),+ ),+ ],),);}