From 9e68f36042deeab972263a50e4b467a05b4fcfa5 Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Thu, 8 Apr 2021 23:15:26 +0300 Subject: [PATCH] Voice Chat Fixes --- .../Sources/VoiceChatController.swift | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatController.swift b/submodules/TelegramCallsUI/Sources/VoiceChatController.swift index a752065360..f43d8d8189 100644 --- a/submodules/TelegramCallsUI/Sources/VoiceChatController.swift +++ b/submodules/TelegramCallsUI/Sources/VoiceChatController.swift @@ -2879,6 +2879,10 @@ public final class VoiceChatController: ViewController { completion?() } self.topPanelBackgroundNode.frame = CGRect(x: 0.0, y: topPanelHeight - 24.0, width: size.width, height: 24.0) + + guard self.panGestureArguments == nil else { + return + } var bottomEdge: CGFloat = 0.0 self.listNode.forEachItemNode { itemNode in @@ -2889,17 +2893,21 @@ public final class VoiceChatController: ViewController { } } } - - let listMaxY = listTopInset + listSize.height - if bottomEdge.isZero { - bottomEdge = listMaxY - } - var bottomOffset: CGFloat = bottomEdge - listMaxY -// if bottomEdge < listMaxY && (self.panGestureArguments != nil || self.isExpanded) { + let listMaxY = listTopInset + listSize.height + var bottomOffset: CGFloat = min(0.0, bottomEdge - listMaxY) + //min(bottomEdge, listMaxY) + +// +// if bottomEdge.isZero { +// bottomEdge = listMaxY +// } +// +// var bottomOffset: CGFloat = min(0.0, bottomEdge - listMaxY) +// if bottomEdge < listMaxY && self.isExpanded { // bottomOffset = bottomEdge - listMaxY // } - +// let bottomCornersFrame = CGRect(origin: CGPoint(x: sideInset, y: -50.0 + bottomOffset), size: CGSize(width: size.width - sideInset * 2.0, height: 50.0)) let previousBottomCornersFrame = self.bottomCornersNode.frame if !bottomCornersFrame.equalTo(previousBottomCornersFrame) {