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

when camera capture or closed, on the root screen will auto disappear. #3558

Closed
NakiriYuuzu opened this issue Aug 24, 2023 · 5 comments
Closed
Labels
question Not a bug, but question or comment

Comments

@NakiriYuuzu
Copy link

NakiriYuuzu commented Aug 24, 2023

Describe the bug
Hi, my problem is when camera capture or closed, on the root screen will auto disappear.

This is the Repository: https://github.com/NakiriYuuzu/DebugKmm

Affected platforms
Select one of the platforms below:

  • iOS

If the bug is Android-only, report it in the Jetpack Compose tracker

Versions

  • Kotlin version*: 1.9.0
  • Compose Multiplatform version*: 1.5.0-rc01
  • OS version(s)* (required for Desktop and iOS issues): 14.1
  • OS architecture (x86 or arm64): arm64
  • JDK (for desktop issues): 17

Screenshots
https://drive.google.com/file/d/1Wo_nmCDCGiZnXYVHsZBfkckDIT7UGO5r/view?usp=sharing

Additional context
when the compose version at 1.4.0 is working fine.

@NakiriYuuzu NakiriYuuzu added bug Something isn't working submitted labels Aug 24, 2023
@elijah-semyonov
Copy link
Contributor

ComposeScene is now destroyed when UIViewController disappears from the screen..

In your case, you can restructure the code to keep your rememberNavigator outside of setContent.

@elijah-semyonov elijah-semyonov added question Not a bug, but question or comment and removed bug Something isn't working submitted labels Aug 24, 2023
@NakiriYuuzu
Copy link
Author

NakiriYuuzu commented Aug 25, 2023

ComposeScene is now destroyed when UIViewController disappears from the screen..

In your case, you can restructure the code to keep your rememberNavigator outside of setContent.

Thank you, I have finally fixed my problem. However, how can I avoid having Compose recreate the screen? When I take a photo and receive a response, the image doesn't show up in the UI, and I lose all the data.

@elijah-semyonov
Copy link
Contributor

elijah-semyonov commented Aug 25, 2023

You can't avoid it as of now (we are not sure about if we want to bring UIViewController-lifetime bound behavior due to many problems it brings for Compose). Regarding the image loss, I don't see hard blocks for working around this problem.
Ask in Kotlin slack community, perhaps somebody already did something similar and knows the solution.

@NakiriYuuzu
Copy link
Author

You can't avoid it as of now (we are not sure about if we want to bring UIViewController-lifetime bound behavior due to many problems it brings for Compose). Regarding the image loss, I don't see hard blocks for working around this problem. Ask in Kotlin slack community, perhaps somebody already did something similar and knows the solution.

Thank you.

@elijah-semyonov
Copy link
Contributor

Sorry, the link was broken, fixed it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Not a bug, but question or comment
Projects
None yet
Development

No branches or pull requests

2 participants