From 2cf64e80eb1139aa92df6c8c5dadd4c143ebf52a Mon Sep 17 00:00:00 2001 From: k1ngsterr1 Date: Thu, 19 Mar 2026 19:28:05 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20=D0=BC?= =?UTF-8?q?=D0=B3=D0=BD=D0=BE=D0=B2=D0=B5=D0=BD=D0=BD=D0=BE=D0=B5=20=D1=80?= =?UTF-8?q?=D0=B0=D1=81=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B5=20=D1=80=D0=B5?= =?UTF-8?q?=D0=BA=D0=B2=D0=B5=D1=81=D1=82=D0=BE=D0=B2=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=20pull=20=D0=B2=D0=BD=D0=B8=D0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../messenger/ui/chats/ChatsListScreen.kt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/rosetta/messenger/ui/chats/ChatsListScreen.kt b/app/src/main/java/com/rosetta/messenger/ui/chats/ChatsListScreen.kt index fba9491..228a300 100644 --- a/app/src/main/java/com/rosetta/messenger/ui/chats/ChatsListScreen.kt +++ b/app/src/main/java/com/rosetta/messenger/ui/chats/ChatsListScreen.kt @@ -1799,7 +1799,9 @@ fun ChatsListScreen( } val localDensity = LocalDensity.current val requestsRevealThresholdPx = - remember(localDensity) { with(localDensity) { 56.dp.toPx() } } + remember(localDensity) { with(localDensity) { 24.dp.toPx() } } + val requestsRevealInstantPx = + remember(localDensity) { with(localDensity) { 8.dp.toPx() } } val requestsHideThresholdPx = remember(localDensity) { with(localDensity) { 16.dp.toPx() } } @@ -2096,6 +2098,7 @@ fun ChatsListScreen( chatListState, requestsCount, requestsRevealThresholdPx, + requestsRevealInstantPx, requestsHideThresholdPx, hapticFeedback ) { @@ -2127,12 +2130,15 @@ fun ChatsListScreen( } } else if (available.y > 0f && !isRequestsVisible && isAtTop()) { // Pull down from top should always reopen requests. + val shouldRevealInstantly = + available.y >= requestsRevealInstantPx accumulatedPullDown = - (accumulatedPullDown + available.y) - .coerceAtMost( - requestsRevealThresholdPx * 2f - ) - if (accumulatedPullDown >= requestsRevealThresholdPx) { + (accumulatedPullDown + available.y).coerceAtMost( + requestsRevealThresholdPx + ) + if (shouldRevealInstantly || + accumulatedPullDown >= requestsRevealThresholdPx + ) { isRequestsVisible = true accumulatedPullDown = 0f if (!hapticSent) {