fix #967, do not allow toggling file visibility in the recycle bin

This commit is contained in:
tibbi 2018-10-02 18:18:11 +02:00
parent 1c38f74ae7
commit ab06f366f8

View file

@ -177,8 +177,9 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
}
}
menu.findItem(R.id.cab_hide).isVisible = unhiddenCnt > 0
menu.findItem(R.id.cab_unhide).isVisible = hiddenCnt > 0
val isInRecycleBin = getSelectedMedia().firstOrNull()?.getIsInRecycleBin() == true
menu.findItem(R.id.cab_hide).isVisible = unhiddenCnt > 0 && !isInRecycleBin
menu.findItem(R.id.cab_unhide).isVisible = hiddenCnt > 0 && !isInRecycleBin
}
private fun checkFavoriteBtnVisibility(menu: Menu) {