Skip to content

Commit

Permalink
chore: pressing download item will open menu
Browse files Browse the repository at this point in the history
instead of playing
  • Loading branch information
MSOB7YY committed Mar 9, 2024
1 parent 828ce5f commit 49a1aeb
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions lib/youtube/widgets/yt_download_task_item_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ class YTDownloadTaskItemCard extends StatelessWidget {
: null;

return NamidaPopupWrapper(
openOnTap: false,
openOnTap: true,
openOnLongPress: true,
childrenDefault: () => YTUtils.getVideoCardMenuItems(
videoId: item.id,
Expand All @@ -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,
Expand Down

0 comments on commit 49a1aeb

Please sign in to comment.