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

iOS compose screen freeze when action moves user out of the app #4566

Closed
BitByAVampire opened this issue Apr 1, 2024 · 0 comments · Fixed by JetBrains/compose-multiplatform-core#1263
Assignees
Labels
bug Something isn't working ios

Comments

@BitByAVampire
Copy link

BitByAVampire commented Apr 1, 2024

Describe the bug
when triggering a navigation action pushing user outside of the app, if user returns again to the same screen, the animation effect that was happening just before the user had left are stuck frozen.

Affected platforms

  • iOS

Versions

  • Kotlin version*: 1.9.22
  • Compose Multiplatform version*: 1.5.12
  • OS version(s)* (required for Desktop and iOS issues): ios 16.4, 17.2.1
  • OS architecture (x86 or arm64):
  • Device (model or simulator for iOS issues): iPhone 14, iPhone XR
  • JDK (for desktop issues):

To Reproduce
Steps and/or the code snippet to reproduce the behavior:

  1. Create a screen that has a trigger that has animation effect like a button (with ripple effect) or a toggle switcher which navigates the user out of the app
  2. trigger the action
  3. on returning to the screen, sometimes the trigger animation is stuck frozen

Expected behavior
the animation effect should be gone.
Screenshots
Simulator Screenshot - iPhone 14 - 2024-04-01 at 00 29 29
Simulator Screenshot - iPhone 14 - 2024-04-01 at 11 29 57

Additional context
Add any other context about the problem here.

@BitByAVampire BitByAVampire added bug Something isn't working submitted labels Apr 1, 2024
@mazunin-v-jb mazunin-v-jb added ios and removed submitted labels Apr 1, 2024
@elijah-semyonov elijah-semyonov self-assigned this Apr 2, 2024
elijah-semyonov added a commit to JetBrains/compose-multiplatform-core that referenced this issue Apr 16, 2024
## Proposed Changes

Invalidate compose scene when the app goes foreground to trigger redraw.
The intent is to avoid the situation where last presented frames are
discarded due to the app going background, leaving the visual content in
older state.

## Testing

Test: Demo/IosBugs/AnimationFreezeBug the visual state always matches
the animation final state when app goes to foreground.

## Issues Fixed

Fixes: JetBrains/compose-multiplatform#4566
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ios
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants