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

No Lifecycle ON_DISPOSE, when remove invisible screens #60

Open
ikarenkov opened this issue Oct 2, 2024 · 0 comments
Open

No Lifecycle ON_DISPOSE, when remove invisible screens #60

ikarenkov opened this issue Oct 2, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ikarenkov
Copy link
Owner

Steps to reproduce in demo app

  1. Use LifecycleScreenEffect to subscribe to lifecycle updates in ButtonsScreenContent
  2. Launch app and navigate to "Stack Actions"
  3. Click "remove previous"
Expected behavior Actual behavior
"LifecycleScreenEffect ON_DESTROY" in logcat for previous screen No message in logcat, it happens only when perform navigation that changes UI

This happened because currently we trigger state clearance only from Compose in DisposableEffect block in Screen.BeforeScreenContent and Screen.AfterScreenContent.
This case enlighten that we should also try to do predispose and dispose when we update state of the navigation.

@ikarenkov ikarenkov added the bug Something isn't working label Oct 2, 2024
@ikarenkov ikarenkov added this to the v0.10.0 milestone Oct 2, 2024
@ikarenkov ikarenkov self-assigned this Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant