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

Bugs when switching apps #53

Closed
Efreak opened this issue Jun 20, 2022 · 7 comments
Closed

Bugs when switching apps #53

Efreak opened this issue Jun 20, 2022 · 7 comments
Labels
android Only related to Android bug Something isn't working

Comments

@Efreak
Copy link
Contributor

Efreak commented Jun 20, 2022

This might be useful: flutter/flutter#20897

  1. start Hacki by opening a URL to a story on news.ycombinator.com.
  2. Switch to a different story
  3. scroll down a ways, start replying
  4. Switch apps (or open the story link or a comment link in the external browser)
  5. Close the new app you've opened by hitting the back button in Android or telling the app to close itself
  6. Instead of being back at Hacki, I'm now at my launcher.
  7. Open Hacki from recents
  8. Hacki opens to the link from step 1, not step 2
    • if Hacki was opened from launcher, without steps 1-2, it opens to the main page with no story open.
    • if I was in the middle of writing a comment, and opened browser to research that comment, everything I've written has disappeared
    • Pick up where you left off doesn't appear until after the story list has finished loading/animating (this should probably be a separate bug report)
@Livinglist Livinglist added the bug Something isn't working label Jun 21, 2022
@Livinglist
Copy link
Owner

Hi @Efreak, can you attach a video going thru the flow as mentioned? Thanks!

@Efreak
Copy link
Contributor Author

Efreak commented Jun 23, 2022

https://gistcdn.rawgit.net/Efreak/3e27f42213f2a071e451ef67c9f35182/raw/24dc9e7f664f0178d25249254e86a51b55817181/Screen_Recording_20220622-211501_Nova7.mp4

Some of these issues (8.1) were fixed or only show up sometimes (I've been waiting for it to go back to the wrong article and it hasn't in the past couple days): it popped to the correct article now.

@Livinglist
Copy link
Owner

@Efreak , can this be consistently reproduced? or it just happens occasionally?

@Livinglist Livinglist added the android Only related to Android label Jun 24, 2022
@Efreak
Copy link
Contributor Author

Efreak commented Jul 25, 2022

Apologies for the delay. I forgot I'd opened this issue. Yes, this is pretty reliable. I just encountered it again now. It's frustrating being in the middle of a comment, switching apps to check a date, and when switching back the entire context has changed.

@quite
Copy link

quite commented Apr 16, 2023

It sounds like this might be happening when the activity is destroyed (or is it stopped?) by the system. If so, then this can be provoked by enabling "Don't keep activities" in the android system developer settings. The hacki activity will then be destroyed as soon as user navigates to another activity. It is the app's responsibility to keep the state that is needed when it's activity is restarted.

Mind you my terminology might not be entirely correct, I'm far from an expert on Android lifecycles.

As Hacki is written in Dart/Flutter it would guess there is an easy way to maintain the state required. RestorationMixin seems to be a thing I learned after a quick search. https://itnext.io/state-restoration-in-flutter-b6030b95a4d4?gi=e4d7d5f12271

@Livinglist
Copy link
Owner

Livinglist commented Nov 9, 2023

@Efreak is this issue still reproducible on v2.3.1? I have tried several times on my only Android phone (Nokia 5.4 with Android 13) but have not been able to reproduce it.

@Efreak
Copy link
Contributor Author

Efreak commented Nov 13, 2023

I haven't seen it recently, but I also haven't been reading HN as much lately. I'll reopen if I see it again.

@Efreak Efreak closed this as completed Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Only related to Android bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants