Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

removed pop up menu from collections and file

AmanRajSinghMourya63a46fdff6ee
diff --git a/mobile/apps/locker/lib/ui/components/collection_list_widget.dart b/mobile/apps/locker/lib/ui/components/collection_list_widget.dart
index 6c5cc5f79c..7260642bc0 100644
--- a/mobile/apps/locker/lib/ui/components/collection_list_widget.dart
+++ b/mobile/apps/locker/lib/ui/components/collection_list_widget.dart
@@ -10,14 +10,11 @@ import "package:locker/models/selected_collections.dart";
import "package:locker/services/collections/collections_service.dart";
import "package:locker/services/collections/models/collection.dart";
import "package:locker/services/configuration.dart";
-import "package:locker/ui/components/collection_popup_menu_widget.dart";
-import "package:locker/ui/components/item_list_view.dart";
import "package:locker/ui/pages/collection_page.dart";
import "package:locker/ui/sharing/album_share_info_widget.dart";
class CollectionListWidget extends StatelessWidget {
final Collection collection;
- final List<OverflowMenuAction>? overflowActions;
final bool isLastItem;
final SelectedCollections? selectedCollections;
final void Function(Collection)? onTapCallback;
@@ -26,7 +23,6 @@ class CollectionListWidget extends StatelessWidget {
const CollectionListWidget({
super.key,
required this.collection,
- this.overflowActions,
this.isLastItem = false,
this.selectedCollections,
this.onTapCallback,
@@ -166,41 +162,29 @@ class CollectionListWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
collectionRowWidget,
- if (isFavourite)
- const SizedBox.shrink()
- else
- Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- if (showSharingIndicator && hasSharees)
- _buildShareesAvatars(
- collection.sharees.whereType<User>().toList(),
- ),
- AnimatedSwitcher(
- duration: const Duration(milliseconds: 200),
- switchInCurve: Curves.easeOut,
- switchOutCurve: Curves.easeIn,
- child: isSelected
- ? IconButtonWidget(
- key: const ValueKey("selected"),
- icon: Icons.check_circle_rounded,
- iconButtonType: IconButtonType.secondary,
- iconColor: colorScheme.primary700,
- )
- : CollectionPopupMenuWidget(
- key: const ValueKey("menu"),
- collection: collection,
- overflowActions: overflowActions,
- child: Padding(
- padding: const EdgeInsets.all(12.0),
- child: HugeIcon(
- icon: HugeIcons.strokeRoundedMoreVertical,
- color: colorScheme.textBase,
- ),
+ if (!isFavourite)
+ Padding(
+ padding: const EdgeInsets.only(right: 12.0),
+ child: AnimatedSwitcher(
+ duration: const Duration(milliseconds: 200),
+ switchInCurve: Curves.easeOut,
+ switchOutCurve: Curves.easeIn,
+ child: isSelected
+ ? IconButtonWidget(
+ key: const ValueKey("selected"),
+ icon: Icons.check_circle_rounded,
+ iconButtonType: IconButtonType.secondary,
+ iconColor: colorScheme.primary700,
+ )
+ : (showSharingIndicator && hasSharees)
+ ? _buildShareesAvatars(
+ collection.sharees.whereType<User>().toList(),
+ )
+ : const SizedBox(
+ key: ValueKey("unselected"),
+ width: 12,
),
- ),
- ),
- ],
+ ),
),
],
),
diff --git a/mobile/apps/locker/lib/ui/components/file_list_widget.dart b/mobile/apps/locker/lib/ui/components/file_list_widget.dart
index cb16e40a76..62251ea86c 100644
--- a/mobile/apps/locker/lib/ui/components/file_list_widget.dart
+++ b/mobile/apps/locker/lib/ui/components/file_list_widget.dart
@@ -9,8 +9,6 @@ import "package:locker/services/collections/collections_service.dart";
import "package:locker/services/configuration.dart";
import "package:locker/services/files/sync/models/file.dart";
import "package:locker/services/info_file_service.dart";
-import "package:locker/ui/components/file_popup_menu_widget.dart";
-import "package:locker/ui/components/item_list_view.dart";
import "package:locker/ui/sharing/album_share_info_widget.dart";
import "package:locker/utils/file_icon_utils.dart";
import "package:locker/utils/file_util.dart";
@@ -18,7 +16,6 @@ import "package:locker/utils/info_item_utils.dart";
class FileListWidget extends StatelessWidget {
final EnteFile file;
- final List<OverflowMenuAction>? overflowActions;
final bool isLastItem;
final SelectedFiles? selectedFiles;
final void Function(EnteFile)? onTapCallback;
@@ -27,19 +24,12 @@ class FileListWidget extends StatelessWidget {
const FileListWidget({
super.key,
required this.file,
- this.overflowActions,
this.isLastItem = false,
this.selectedFiles,
this.onTapCallback,
this.onLongPressCallback,
});
- // TODO: Re-enable file popup menu for shared files when file actions are ready
- bool get _isFileOwnedByUser {
- final currentUserID = Configuration.instance.getUserID();
- return file.ownerID == currentUserID;
- }
-
@override
Widget build(BuildContext context) {
final colorScheme = getEnteColorScheme(context);
@@ -148,38 +138,26 @@ class FileListWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
fileRowWidget,
- Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- if (showSharingIndicator && hasSharees)
- _buildShareesAvatars(sharees),
- AnimatedSwitcher(
- duration: const Duration(milliseconds: 200),
- switchInCurve: Curves.easeOut,
- switchOutCurve: Curves.easeIn,
- child: isSelected
- ? IconButtonWidget(
- key: const ValueKey("selected"),
- icon: Icons.check_circle_rounded,
- iconButtonType: IconButtonType.secondary,
- iconColor: colorScheme.primary700,
- )
- : _isFileOwnedByUser
- ? FilePopupMenuWidget(
- file: file,
- overflowActions: overflowActions,
- child: Padding(
- padding: const EdgeInsets.all(12.0),
- child: HugeIcon(
- icon: HugeIcons.strokeRoundedMoreVertical,
- color:
- getEnteColorScheme(context).textBase,
- ),
- ),
- )
- : const SizedBox(width: 48),
- ),
- ],
+ Padding(
+ padding: const EdgeInsets.only(right: 12.0),
+ child: AnimatedSwitcher(
+ duration: const Duration(milliseconds: 300),
+ switchInCurve: Curves.easeOut,
+ switchOutCurve: Curves.easeIn,
+ child: isSelected
+ ? IconButtonWidget(
+ key: const ValueKey("selected"),
+ icon: Icons.check_circle_rounded,
+ iconButtonType: IconButtonType.secondary,
+ iconColor: colorScheme.primary700,
+ )
+ : (showSharingIndicator && hasSharees)
+ ? _buildShareesAvatars(sharees)
+ : const SizedBox(
+ key: ValueKey("unselected"),
+ width: 12,
+ ),
+ ),
),
],
),