adding a crashfix at actionmenu item checking

This commit is contained in:
tibbi 2020-05-06 18:37:46 +02:00
parent e870e9b2f4
commit 4f3de9a9ad

View file

@ -93,7 +93,7 @@ class SongAdapter(activity: SimpleActivity, var songs: ArrayList<Song>, val list
override fun prepareActionMode(menu: Menu) {
menu.apply {
findItem(R.id.cab_rename).isVisible = isOneItemSelected() && !getSelectedSongs().first().path.startsWith("content://")
findItem(R.id.cab_rename).isVisible = isOneItemSelected() && getSelectedSongs().firstOrNull()?.path?.startsWith("content://") != true
}
}