Merge pull request #4029 from basilgello/master

Fix crash when deselecting item in drawer
This commit is contained in:
cketti 2019-04-30 16:22:12 +02:00 committed by GitHub
commit b4c9928fda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -1664,7 +1664,7 @@ public class MessageList extends K9Activity implements MessageListFragmentListen
} else if (search.getId().equals(SearchAccount.UNIFIED_INBOX)) {
drawer.selectUnifiedInbox();
} else {
drawer.selectFolder(null);
drawer.deselect();
}
}
}

View file

@ -278,6 +278,12 @@ class K9Drawer(private val parent: MessageList, savedInstanceState: Bundle?) {
updateFolderSettingsItem()
}
fun deselect() {
unifiedInboxSelected = false
openedFolderServerId = null
drawer.deselect()
}
fun selectUnifiedInbox() {
unifiedInboxSelected = true
openedFolderServerId = null