Skip to content

Commit

Permalink
Prevent activity overlap when toggling "Show Unified Inbox"
Browse files Browse the repository at this point in the history
  • Loading branch information
mhf1998 committed Feb 20, 2025
1 parent e3eab6b commit 6a4304e
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ open class MessageList :
if (messageListActivityConfig == null) {
messageListActivityConfig = MessageListActivityConfig.create(generalSettingsManager)
} else if (messageListActivityConfig != MessageListActivityConfig.create(generalSettingsManager)) {
recreateCompat()
recreateMessageList(this)
}

if (displayMode != DisplayMode.MESSAGE_VIEW) {
Expand Down Expand Up @@ -1606,6 +1606,16 @@ open class MessageList :
val intent = shortcutIntentForAccount(context, accountUuid)
context.startActivity(intent)
}

@JvmStatic
fun recreateMessageList(context: Context) {
val intent = Intent(context, MessageList::class.java).apply {
addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
}

context.startActivity(intent)
}
}
}

Expand Down

0 comments on commit 6a4304e

Please sign in to comment.