Remove options menu on ArchivedConversationsActivity when there are no conversations
This commit is contained in:
parent
1b8cfee9ea
commit
b9b85ea6a7
1 changed files with 7 additions and 0 deletions
|
|
@ -58,6 +58,12 @@ class ArchivedConversationsActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun updateOptionsMenu(conversations: ArrayList<Conversation>) {
|
||||
archive_toolbar.menu.apply {
|
||||
findItem(R.id.empty_archive).isVisible = conversations.isNotEmpty()
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateMenuColors() {
|
||||
updateStatusbarColor(getProperBackgroundColor())
|
||||
}
|
||||
|
|
@ -116,6 +122,7 @@ class ArchivedConversationsActivity : SimpleActivity() {
|
|||
).toMutableList() as ArrayList<Conversation>
|
||||
|
||||
showOrHidePlaceholder(conversations.isEmpty())
|
||||
updateOptionsMenu(conversations)
|
||||
|
||||
try {
|
||||
getOrCreateConversationsAdapter().apply {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue