From 76ad853f79442ec34a91f81e5d1a917332e47411 Mon Sep 17 00:00:00 2001 From: k1ngsterr1 Date: Fri, 6 Feb 2026 22:20:03 +0500 Subject: [PATCH] fix: update swipe-back thresholds for improved responsiveness --- .../rosetta/messenger/ui/components/SwipeBackContainer.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/rosetta/messenger/ui/components/SwipeBackContainer.kt b/app/src/main/java/com/rosetta/messenger/ui/components/SwipeBackContainer.kt index d2df8ad..b6bd483 100644 --- a/app/src/main/java/com/rosetta/messenger/ui/components/SwipeBackContainer.kt +++ b/app/src/main/java/com/rosetta/messenger/ui/components/SwipeBackContainer.kt @@ -23,9 +23,9 @@ import kotlinx.coroutines.launch // Telegram's CubicBezierInterpolator(0.25, 0.1, 0.25, 1.0) private val TelegramEasing = CubicBezierEasing(0.25f, 0.1f, 0.25f, 1.0f) -// Constants matching Telegram -private const val COMPLETION_THRESHOLD = 0.5f // 50% of screen width -private const val FLING_VELOCITY_THRESHOLD = 600f // px/s +// Swipe-back thresholds +private const val COMPLETION_THRESHOLD = 0.3f // 30% of screen width (was 50%) +private const val FLING_VELOCITY_THRESHOLD = 400f // px/s (was 600) private const val ANIMATION_DURATION_ENTER = 300 private const val ANIMATION_DURATION_EXIT = 250 private const val EDGE_ZONE_DP = 200