Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent activity overlap when toggling "Show Unified Inbox" #8847

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mhf1998
Copy link
Contributor

@mhf1998 mhf1998 commented Feb 20, 2025

Fixes #8767

Description:
This PR fixes the issue where toggling the "Show Unified Inbox" setting causes activity overlap and inconsistent UI updates. As described in my comment on #8767, the problem occurs because ActivityCompat.recreate() adds a new instance of MessageList to the back stack without clearing the previous one, leading to "ghost" activities when navigating back.

Changes:
Replaced ActivityCompat.recreate() with a new recreateMessageList() function that uses Intent with FLAG_ACTIVITY_NEW_TASK and FLAG_ACTIVITY_CLEAR_TASK to ensure a clean activity launch.

Testing:
Verified both scenarios: enabling and disabling "Show Unified Inbox".
Confirmed that pressing the back button now closes the app or returns to the previous screen without overlapping activities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show/Hide Unified Inbox does not update immediately
1 participant