Skip to content

Prevent chat window corner radius getting stuck after back gesture is cancelled#14661

Open
ateeb-infocusp wants to merge 3 commits intosignalapp:mainfrom
ateeb-infocusp:main
Open

Prevent chat window corner radius getting stuck after back gesture is cancelled#14661
ateeb-infocusp wants to merge 3 commits intosignalapp:mainfrom
ateeb-infocusp:main

Conversation

@ateeb-infocusp
Copy link
Copy Markdown

First time contributor checklist

Contributor checklist

  • Samsung S23 Ultra, Android 16.0
  • Google Pixel 7, Android 15.0
  • Google Pixel 5, Android 13.0

Description

Enhanced the navigation state machine to explicitly handle cancelled gestures and refined the animation logic to ensure smooth transitions when a user starts, completes, or abandons a predictive back action. This prevents UI elements from getting "stuck" in intermediate states and ensures a good feel during navigation.

Main Changes

  • Introduced NavigationState.CANCEL: Added a dedicated state to the AppScaffoldNavigator to handle cases where a user starts a back gesture but moves their finger back to the edge to cancel it.

  • Refined State Transitions:

    • AppScaffoldNavigator now detects a 0f seek fraction to trigger the CANCEL state.
    • Added wasSeekInProgress tracking to ensure navigateBack always triggers the appropriate RELEASE animation if a gesture was recently active.
  • Animation Logic Updates:

    • Updated AppScaffoldAnimationStateFactory to provide specific animation states for CANCEL, ensuring panes slide back into their original positions correctly.
    • Optimized defaultDetailReleaseAnimationState by removing redundant remember blocks and ensuring properties like corners reset to 0.dp upon completion.
  • Code Cleanup: Simplified animator implementations in AppScaffoldAnimators.kt for better maintainability and more predictable animation behavior.

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.

1 participant