Exit Playlist page when playlist is deleted

This commit is contained in:
Prathamesh More 2022-03-27 19:55:58 +05:30
parent 0c4cabc755
commit b4dc50306f
5 changed files with 22 additions and 15 deletions

View file

@ -64,4 +64,7 @@ interface PlaylistDao {
@Query("SELECT * FROM SongEntity WHERE playlist_creator_id= :playlistId")
fun favoritesSongs(playlistId: Long): List<SongEntity>
@Query("SELECT EXISTS(SELECT * FROM PlaylistEntity WHERE playlist_id = :playlistId)")
fun checkPlaylistExists(playlistId: Long): LiveData<Boolean>
}