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 an IllegalStateException crash #1171

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

Luna712
Copy link
Contributor

@Luna712 Luna712 commented Jul 3, 2024

When you play something, then go home on the device, and come back to something that should run popCurrentPage(), IE noLinksFound(), it often causes the app to crash into safe mode with IllegalStateException.

This may not be the best solution here, but testing seems to indicate it does work to fix this.

I thought about using supportFragmentManager.popBackStack(), but that seems to cause a bigger delay in doing anything, even if we don't have any issues here. Also onBackPressedDispatcher.onBackPressed() can be more in line with how Android handles back press actions, respecting the back stack and fragment lifecycle more conveniently so went with this approach.

When you play something, then go home on the device, and come back to something that should run popCurrentPage(), IE `noLinksFound()`, it often causes the app to crash into safe mode with IllegalStateException.

This may not be the best solution here, but testing seems to indicate it does work to fix this.

I thought about using `supportFragmentManager.popBackStack()`, but that seems to cause a bigger delay in doing anything, even if we don't have any issues here. Also `onBackPressedDispatcher.onBackPressed()` can be more in line with how Android handles back press actions, respecting the back stack and fragment lifecycle more conveniently so went with this approach.
@fire-light42
Copy link
Collaborator

I have no idea if this fixes the issue as it is like 1 frame timing, however I will trust you on this.

@fire-light42 fire-light42 merged commit 29ec554 into recloudstream:master Jul 4, 2024
2 checks passed
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