From 49a1aeb3ca85e2b3af2578dc53cc810b29f8a294 Mon Sep 17 00:00:00 2001 From: MSOB7YY Date: Sat, 9 Mar 2024 14:31:46 +0200 Subject: [PATCH] chore: pressing download item will open menu instead of playing --- .../widgets/yt_download_task_item_card.dart | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/youtube/widgets/yt_download_task_item_card.dart b/lib/youtube/widgets/yt_download_task_item_card.dart index 868ff19c..1abef8d0 100644 --- a/lib/youtube/widgets/yt_download_task_item_card.dart +++ b/lib/youtube/widgets/yt_download_task_item_card.dart @@ -478,7 +478,7 @@ class YTDownloadTaskItemCard extends StatelessWidget { : null; return NamidaPopupWrapper( - openOnTap: false, + openOnTap: true, openOnLongPress: true, childrenDefault: () => YTUtils.getVideoCardMenuItems( videoId: item.id, @@ -488,13 +488,20 @@ class YTDownloadTaskItemCard extends StatelessWidget { idsNamesLookup: {item.id: info?.name}, playlistName: '', videoYTID: null, - ), + )..insert( + 0, + NamidaPopupItem( + icon: Broken.play_circle, + title: lang.PLAY_ALL, + onTap: () { + YTUtils.expandMiniplayer(); + Player.inst.playOrPause(index, videos.map((e) => YoutubeID(id: e.id, playlistID: null)), QueueSource.others); + }, + ), + ), child: NamidaInkWell( borderRadius: 10.0, - onTap: () { - YTUtils.expandMiniplayer(); - Player.inst.playOrPause(index, videos.map((e) => YoutubeID(id: e.id, playlistID: null)), QueueSource.others); - }, + onTap: null, margin: const EdgeInsets.symmetric(horizontal: 4.0, vertical: 2.0), padding: const EdgeInsets.symmetric(vertical: 4.0), bgColor: context.theme.cardColor,