Fixed a crash when casting

This commit is contained in:
Prathamesh More 2022-05-13 15:08:33 +05:30
parent 2791ac49c5
commit 165d180fe6

View file

@ -179,10 +179,9 @@ class LibraryViewModel(
fun shuffleSongs() = viewModelScope.launch(IO) { fun shuffleSongs() = viewModelScope.launch(IO) {
val songs = repository.allSongs() val songs = repository.allSongs()
MusicPlayerRemote.openAndShuffleQueue( withContext(Main) {
songs, MusicPlayerRemote.openAndShuffleQueue(songs, true)
true }
)
} }
fun renameRoomPlaylist(playListId: Long, name: String) = viewModelScope.launch(IO) { fun renameRoomPlaylist(playListId: Long, name: String) = viewModelScope.launch(IO) {