Code refactor

This commit is contained in:
Hemanth S 2020-09-05 19:33:12 +05:30
parent ffa0749849
commit 061b9c90ab
24 changed files with 108 additions and 126 deletions

View file

@ -51,7 +51,8 @@ class AddToRetroPlaylist : BottomSheetDialogFragment() {
return materialDialog(R.string.add_playlist_title)
.setItems(playlistNames.toTypedArray()) { _, which ->
if (which == 0) {
CreateRetroPlaylist.create(songs).show(requireActivity().supportFragmentManager, "Dialog")
CreateRetroPlaylist.create(songs)
.show(requireActivity().supportFragmentManager, "Dialog")
} else {
lifecycleScope.launch(Dispatchers.IO) {
val songEntities = songs.toSongEntity(playlistEntities[which - 1])