Skip to content

armgit / ente

Public Imported from GitHub
0

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

Unify tap behavior across feed item

ashilknaecc0731cdc1
diff --git a/mobile/apps/photos/lib/ui/social/feed_screen.dart b/mobile/apps/photos/lib/ui/social/feed_screen.dart
index d5ffe970e3..3e0132a98f 100644
--- a/mobile/apps/photos/lib/ui/social/feed_screen.dart
+++ b/mobile/apps/photos/lib/ui/social/feed_screen.dart
@@ -155,7 +155,6 @@ class _FeedScreenState extends State<FeedScreen> {
onTap: () => item.type == FeedItemType.photoLike
? _openPhoto(item)
: _openComments(item),
- onThumbnailTap: () => _openPhoto(item),
);
},
),
diff --git a/mobile/apps/photos/lib/ui/social/widgets/feed_item_widget.dart b/mobile/apps/photos/lib/ui/social/widgets/feed_item_widget.dart
index 81591cbbe9..f4f6a9e1e5 100644
--- a/mobile/apps/photos/lib/ui/social/widgets/feed_item_widget.dart
+++ b/mobile/apps/photos/lib/ui/social/widgets/feed_item_widget.dart
@@ -17,12 +17,9 @@ class FeedItemWidget extends StatelessWidget {
final FeedItem feedItem;
final int currentUserID;
- /// Called when the user taps on non-thumbnail areas (icon, avatar, text).
+ /// Called when the user taps anywhere on the feed item.
final VoidCallback? onTap;
- /// Called when the user taps on the photo thumbnail.
- final VoidCallback? onThumbnailTap;
-
/// Map of anonUserID -> decrypted display name for the collection.
final Map<String, String> anonDisplayNames;
@@ -33,7 +30,6 @@ class FeedItemWidget extends StatelessWidget {
required this.feedItem,
required this.currentUserID,
this.onTap,
- this.onThumbnailTap,
this.anonDisplayNames = const {},
this.isLastItem = false,
super.key,
@@ -90,10 +86,10 @@ class FeedItemWidget extends StatelessWidget {
),
),
const SizedBox(width: 12),
- // Photo thumbnail - separate tap target
+ // Photo thumbnail
if (feedItem.fileID != null)
GestureDetector(
- onTap: onThumbnailTap,
+ onTap: onTap,
child: _FeedThumbnail(
fileID: feedItem.fileID!,
collectionID: feedItem.collectionID,