You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gnprice opened this issue
Apr 30, 2024
· 2 comments
Labels
a-AndroidIssues specific to Android, or requiring Android-specific worka-homeThe home screens of the app; finding and starting conversationsupstreamWould benefit from work in Flutter or another upstream
I don't think there's a particularly straightforward workaround for us within the app, but hopefully it'll get fixed upstream. (So filing this issue mainly to track that this is a known issue and what the root cause is, in case people notice it again in the future.) Here's my summary of the state of the issue: flutter/flutter#117061 (comment)
The text was updated successfully, but these errors were encountered:
gnprice
added
a-Android
Issues specific to Android, or requiring Android-specific work
a-home
The home screens of the app; finding and starting conversations
labels
Apr 30, 2024
I'd encourage you to try fixing this bug in Flutter upstream. That would be especially valuable because it means that everyone using Flutter would get the benefit of your fix.
Another benefit of an upstream fix is that I think it can ultimately be a lot less code. Fundamentally Flutter already has a sensible system for delegating from one piece of code to another the decision of what should happen on a back gesture: falling back from individual routes with custom logic, to the navigator's generic logic, to platform logic for when at the root of the navigation. The trouble is just that at the very end of that fallback chain, it makes the wrong decision (wrong since Android 12), at this line of code:
So by fixing that line to instead call Activity#onBackPressed, it becomes unnecessary to intercept Flutter's normal flow for deciding what to do with a back gesture, or to introduce a new MethodChannel.
If you do send a PR upstream, please feel free to ping me there and/or on this thread, and I'd be glad to do a review (I'm a Flutter committer). For questions leading up to a PR, you may find the Flutter contributor Discord helpful; try #hackers or #hackers-android, and feel free to ping me in a channel on that Discord too.
a-AndroidIssues specific to Android, or requiring Android-specific worka-homeThe home screens of the app; finding and starting conversationsupstreamWould benefit from work in Flutter or another upstream
Repro steps:
This is an upstream Flutter issue:
The expected behavior is new in Android 12 (so in 2021); before that, our actual behavior was expected. See Android docs:
https://developer.android.com/about/versions/12/behavior-changes-all#back-press
I don't think there's a particularly straightforward workaround for us within the app, but hopefully it'll get fixed upstream. (So filing this issue mainly to track that this is a known issue and what the root cause is, in case people notice it again in the future.) Here's my summary of the state of the issue: flutter/flutter#117061 (comment)
The text was updated successfully, but these errors were encountered: