Ashinch / ReadYou

An Android RSS reader presented in Material You style.
GNU General Public License v3.0
5.11k stars 202 forks source link

AlertDialog disappears on system-initiated process death #843

Open nicolarevelant opened 1 month ago

nicolarevelant commented 1 month ago

1. Environment

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 add icon at the top right
  2. background/foreground app with "Don't Keep Activities" option enabled

Possible solution:

app/src/main/java/me/ash/reader/ui/page/home/feeds/subscribe/SubscribeViewModel.kt:38 move state holder from ViewModel to the Composable using rememberSaveable

Screenshots: