From dedf0317d32fa21851d60d38ff5ed4a844bb2f2b Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Sun, 26 Sep 2021 23:41:17 +0300 Subject: [PATCH] Disallow scheduled voice chat screen expansion --- submodules/TelegramCallsUI/Sources/VoiceChatController.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/submodules/TelegramCallsUI/Sources/VoiceChatController.swift b/submodules/TelegramCallsUI/Sources/VoiceChatController.swift index 26413fa2a5..84f8cef824 100644 --- a/submodules/TelegramCallsUI/Sources/VoiceChatController.swift +++ b/submodules/TelegramCallsUI/Sources/VoiceChatController.swift @@ -5832,6 +5832,10 @@ public final class VoiceChatController: ViewController { let translation = recognizer.translation(in: self.contentContainer.view) var velocity = recognizer.velocity(in: self.contentContainer.view) + if self.isScheduled && (translation.y < 0.0 || velocity.y < 0.0) { + return + } + if case let .known(value) = contentOffset, value > 0.0 { velocity = CGPoint() } else if case .unknown = contentOffset {