From e0eb76c68ed91b9758cb872c9ab766a8a8347ed4 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 25 May 2019 22:18:25 +0200 Subject: [PATCH] fix #1425, do not show the Add To Favorites menu item at the recycle bin --- .../simplemobiletools/gallery/pro/adapters/MediaAdapter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt index 71172f323..e0eafbb6a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt @@ -182,8 +182,8 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList) { - 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() {