Go to Unified Inbox when pressing back in message list
@@ -586,6 +586,13 @@ open class MessageList :
showMessageList()
} else {
if (isDrawerEnabled && account != null && supportFragmentManager.backStackEntryCount == 0) {
+ if (K9.isShowUnifiedInbox) {
+ if (search!!.id != SearchAccount.UNIFIED_INBOX) {
+ openUnifiedInbox()
+ } else {
+ super.onBackPressed()
+ }
+ } else {
val defaultFolderId = defaultFolderProvider.getDefaultFolder(account!!)
val currentFolder = if (singleFolderMode) search!!.folderIds[0] else null
if (currentFolder == null || defaultFolderId != currentFolder) {
@@ -593,6 +600,7 @@ open class MessageList :
} else {
super.onBackPressed()
}
+ }
} else {
super.onBackPressed()
}
