8000 Be less aggressive when nulling out the current activity; bump version by jhaven-stytch · Pull Request #239 · stytchauth/stytch-android · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Be less aggressive when nulling out 8000 the current activity; bump version #239

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

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

jhaven-stytch
Copy link
Contributor

Changes:

  1. We only actually need to set the current activity in onResumed, as that's the last state when an activity is visible
  2. We don't need to explicitly null out the weakreference, as this class is scoped to the lifetime of the application, and it's very difficult to accurately know the exact order that the lifecycle events will fire when launching multiple activities. The previous implementation worked when launching between different activities, but failed when you launched the same activity back-to-back. This solution works in both cases, plus navigating back to an existing activity.

Notes:

Checklist:

  • I have verified that this change works in the relevant demo app, or N/A
  • I have added or updated any tests relevant to this change, or N/A
  • I have updated any relevant README files for this change, or N/A

@jhaven-stytch jhaven-stytch requested a review from a team as a code owner December 17, 2024 20:57
@jhaven-stytch jhaven-stytch requested review from alex-stytch and nidal-stytch and removed request for alex-stytch December 17, 2024 20:57
@jhaven-stytch jhaven-stytch merged commit 052d0d2 into main Dec 17, 2024
4 checks passed
@jhaven-stytch jhaven-stytch deleted the jordan/fix-activity-lifecycle-for-dfp branch December 17, 2024 21:37
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
0