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

Fix account page back button behaviour on Android #1293

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

hjiangsu
Copy link
Member

@hjiangsu hjiangsu commented Apr 10, 2024

Pull Request Description

This PR fixes an issue where the Account page back button handler and the main Thunder page back button handlers were triggering at the same time.

We can prevent this by using stopDefaultButtonEvent parameter from the BackButtonInterceptor callback function. See https://pub.dev/packages/back_button_interceptor#in-more-detail for more details on how this parameter works.

Issue Being Fixed

Relates to #1269

Issue Number: N/A

Screenshots / Recordings

Checklist

  • Did you update CHANGELOG.md?
  • Did you use localized strings where applicable?
  • Did you add semanticLabels where applicable for accessibility?

@hjiangsu hjiangsu mentioned this pull request Apr 10, 2024
3 tasks
Copy link
Member

@micahmo micahmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this is a much better fix than mine! 😆

@@ -221,24 +222,24 @@ class _ThunderState extends State<Thunder> {
}

// If the incoming link is a custom URL, replace it back with https://
String _link = link?.replaceAll('thunder://', 'https://') ?? "";
String originalLink = link?.replaceAll('thunder://', 'https://') ?? "";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I just fixed this in #1292! 😆

@hjiangsu hjiangsu merged commit 2f162ad into develop Apr 10, 2024
1 check passed
@hjiangsu hjiangsu deleted the fix/back-button-account-page branch April 10, 2024 19:47
iparks99 pushed a commit to iparks99/thunder that referenced this pull request Apr 10, 2024
iparks99 pushed a commit to iparks99/thunder that referenced this pull request Apr 10, 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

Successfully merging this pull request may close these issues.

2 participants