Skip to content

Commit

Permalink
[MultiSelection] fix crash when selection has no songs
Browse files Browse the repository at this point in the history
  • Loading branch information
chr56 committed Dec 13, 2024
1 parent df30f99 commit c951a80
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,11 @@ object MultiSelectionToolbarMenuProviders {
onClick {
context.lifecycleScopeOrNewOne().launch {
val songs = convertToSongs(controller.selected, context)
if (songs.size > 1)
if (songs.size > 1) {
MultiTagBrowserActivity.launch(context, ArrayList(songs.map { it.data }))
else
} else if (songs.size == 1) {
TagBrowserActivity.launch(context, songs.first().data)
}
}
controller.unselectedAll()
true
Expand Down

0 comments on commit c951a80

Please sign in to comment.