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

AlertDialog disappears on system-initiated process death 2 #844

Open
nicolarevelant opened this issue Sep 25, 2024 · 0 comments
Open

AlertDialog disappears on system-initiated process death 2 #844

nicolarevelant opened this issue Sep 25, 2024 · 0 comments

Comments

@nicolarevelant
Copy link

nicolarevelant commented Sep 25, 2024

1. Environment

  • Device: [Xiaomi Redmi Note 8 Pro]
  • OS: [Android 14]
  • APP: [0.9.12]

Note: not fixed in 0.10.1

2. Describe the bug

This article explains why it matters: Save UI State - Android Developers

Problem: when I perform this sequence of events the AlertDialog disappears:

  1. Touch the settings icon at the top left
  2. Touch Accounts
  3. Touch an account
  4. Touch Clear all articles
  5. background/foreground app with "Don't Keep Activities" option enabled

or:

  1. Touch the settings icon at the top left
  2. Touch Accounts
  3. Touch an account
  4. Touch Delete account
  5. background/foreground app with "Don't Keep Activities" option enabled

Possible solution:

  • app/src/main/java/me/ash/reader/ui/page/settings/accounts/AccountViewModel.kt
  • variable accountUiState: move state holder from ViewModel to the Composable using rememberSaveable at least for fields deleteDialogVisible and clearDialogVisible.

Screenshots:

@nicolarevelant nicolarevelant changed the title AlertDialog disappears on system-initiated process death AlertDialog disappears on system-initiated process death 2 Sep 27, 2024
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

No branches or pull requests

1 participant