fix #1425, do not show the Add To Favorites menu item at the recycle bin
This commit is contained in:
parent
d9a3dda095
commit
e0eb76c68e
|
@ -182,8 +182,8 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
|
|||
}
|
||||
|
||||
private fun checkFavoriteBtnVisibility(menu: Menu, selectedItems: ArrayList<Medium>) {
|
||||
menu.findItem(R.id.cab_add_to_favorites).isVisible = selectedItems.any { !it.isFavorite }
|
||||
menu.findItem(R.id.cab_remove_from_favorites).isVisible = selectedItems.any { it.isFavorite }
|
||||
menu.findItem(R.id.cab_add_to_favorites).isVisible = selectedItems.none { it.getIsInRecycleBin() } && selectedItems.any { !it.isFavorite }
|
||||
menu.findItem(R.id.cab_remove_from_favorites).isVisible = selectedItems.none { it.getIsInRecycleBin() } && selectedItems.any { it.isFavorite }
|
||||
}
|
||||
|
||||
private fun confirmSelection() {
|
||||
|
|
Loading…
Reference in New Issue