Remove empty recycle bin menu item if there are no recycle bin conversations
This commit is contained in:
parent
372dbaeaa4
commit
31be5d3d95
2 changed files with 8 additions and 1 deletions
|
|
@ -58,6 +58,12 @@ class RecycleBinConversationsActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun updateOptionsMenu(conversations: ArrayList<Conversation>) {
|
||||
recycle_bin_toolbar.menu.apply {
|
||||
findItem(R.id.empty_recycle_bin).isVisible = conversations.isNotEmpty()
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateMenuColors() {
|
||||
updateStatusbarColor(getProperBackgroundColor())
|
||||
}
|
||||
|
|
@ -117,6 +123,7 @@ class RecycleBinConversationsActivity : SimpleActivity() {
|
|||
).toMutableList() as ArrayList<Conversation>
|
||||
|
||||
showOrHidePlaceholder(conversations.isEmpty())
|
||||
updateOptionsMenu(conversations)
|
||||
|
||||
try {
|
||||
getOrCreateConversationsAdapter().apply {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue