Remove options menu on ArchivedConversationsActivity when there are no conversations
This commit is contained in:
parent
1b8cfee9ea
commit
b9b85ea6a7
|
@ -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() {
|
private fun updateMenuColors() {
|
||||||
updateStatusbarColor(getProperBackgroundColor())
|
updateStatusbarColor(getProperBackgroundColor())
|
||||||
}
|
}
|
||||||
|
@ -116,6 +122,7 @@ class ArchivedConversationsActivity : SimpleActivity() {
|
||||||
).toMutableList() as ArrayList<Conversation>
|
).toMutableList() as ArrayList<Conversation>
|
||||||
|
|
||||||
showOrHidePlaceholder(conversations.isEmpty())
|
showOrHidePlaceholder(conversations.isEmpty())
|
||||||
|
updateOptionsMenu(conversations)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
getOrCreateConversationsAdapter().apply {
|
getOrCreateConversationsAdapter().apply {
|
||||||
|
|
Loading…
Reference in New Issue