Skip to content

Commit

Permalink
modified deleting conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
aneesh1122 committed Feb 5, 2025
1 parent ef633a2 commit 71d9b43
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ fun InPlaylistMediaItemMenu(
if (!isNetworkConnected(context) && playlist?.playlist?.isEditable == true && isYouTubeSyncEnabled()){
SmartMessage(context.resources.getString(R.string.no_connection), context = context, type = PopupType.Error)
} else if ((playlist?.playlist?.browseId == null)
|| playlist.playlist.isEditable
|| !(playlist.playlist.isYoutubePlaylist)) {
|| playlist.playlist.isEditable) {
Database.asyncTransaction {
deleteSongFromPlaylist(song.id, playlistId)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1573,8 +1573,7 @@ fun LocalPlaylistSongs(
onRename = {
if (!isNetworkConnected(context) && playlistPreview.playlist.isEditable && isYouTubeSyncEnabled()){
SmartMessage(context.resources.getString(R.string.no_connection), context = context, type = PopupType.Error)
} else if ((((playlistPreview.playlist.browseId == null) && playlistNotMonthlyType) || playlistPreview.playlist.isEditable) || !playlistPreview.playlist.isYoutubePlaylist
){
} else if ((((playlistPreview.playlist.browseId == null) && playlistNotMonthlyType) || playlistPreview.playlist.isEditable) ){
isRenaming = true
}
else SmartMessage(context.resources.getString(R.string.info_cannot_rename_a_monthly_or_piped_playlist), context = context)
Expand Down Expand Up @@ -2105,8 +2104,7 @@ fun LocalPlaylistSongs(
if (!isNetworkConnected(context) && (playlistPreview?.playlist?.isEditable == true) && isYouTubeSyncEnabled()){
SmartMessage(context.resources.getString(R.string.no_connection), context = context, type = PopupType.Error)
} else if ((playlistPreview?.playlist?.browseId == null)
|| playlistPreview?.playlist?.isEditable == true
|| (playlistPreview?.playlist?.isYoutubePlaylist == false)) {
|| playlistPreview?.playlist?.isEditable == true) {
Database.asyncTransaction {
Database.move(playlistId, positionInPlaylist, Int.MAX_VALUE)
Database.delete(
Expand Down

0 comments on commit 71d9b43

Please sign in to comment.