Skip to content

Commit

Permalink
chore: confirm before removing from yt playlist
Browse files Browse the repository at this point in the history
  • Loading branch information
MSOB7YY committed Mar 24, 2024
1 parent 831258a commit b2c71ee
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion lib/youtube/youtube_playlists_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,24 @@ class YoutubePlaylistsView extends StatelessWidget {
indexes.add(index);
}
});
YoutubePlaylistController.inst.removeTracksFromPlaylist(playlist, indexes);
NamidaNavigator.inst.navigateDialog(
dialog: CustomBlurryDialog(
isWarning: true,
normalTitleStyle: true,
bodyText: "${lang.REMOVE_FROM_PLAYLIST} ${playlist.name.addDQuotation()}?",
actions: [
const CancelButton(),
const SizedBox(width: 6.0),
NamidaButton(
text: lang.REMOVE.toUpperCase(),
onPressed: () {
NamidaNavigator.inst.closeDialog();
YoutubePlaylistController.inst.removeTracksFromPlaylist(playlist, indexes);
},
)
],
),
);
} else {
YoutubePlaylistController.inst.addTracksToPlaylist(playlist, idsToAdd);
}
Expand Down

0 comments on commit b2c71ee

Please sign in to comment.