init
This commit is contained in:
parent
0e9392b6c5
commit
4596e6e82c
1 changed files with 7 additions and 0 deletions
|
@ -363,6 +363,13 @@ class LibraryViewModel(
|
||||||
createPlaylist(PlaylistEntity(playlistName = playlistName))
|
createPlaylist(PlaylistEntity(playlistName = playlistName))
|
||||||
insertSongs(songs.map { it.toSongEntity(playlistId) })
|
insertSongs(songs.map { it.toSongEntity(playlistId) })
|
||||||
forceReload(Playlists)
|
forceReload(Playlists)
|
||||||
|
withContext(Main){
|
||||||
|
Toast.makeText(
|
||||||
|
App.getContext(),
|
||||||
|
"Added ${songs.size} song(s) to $playlistName",
|
||||||
|
Toast.LENGTH_SHORT
|
||||||
|
).show()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
val playlist = playlists.firstOrNull()
|
val playlist = playlists.firstOrNull()
|
||||||
if (playlist != null) {
|
if (playlist != null) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue