From c16de1fcd94f8399bae329655db9ab55b66173a2 Mon Sep 17 00:00:00 2001 From: Ali <> Date: Mon, 24 Aug 2020 23:44:59 +0100 Subject: [PATCH] Fix iPad rotation --- .../Sources/CallControllerNode.swift | 14 +++++++++++--- submodules/TgVoipWebrtc/tgcalls | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/submodules/TelegramCallsUI/Sources/CallControllerNode.swift b/submodules/TelegramCallsUI/Sources/CallControllerNode.swift index dad5145944..2bde274783 100644 --- a/submodules/TelegramCallsUI/Sources/CallControllerNode.swift +++ b/submodules/TelegramCallsUI/Sources/CallControllerNode.swift @@ -172,7 +172,7 @@ private final class CallVideoNode: ASDisplayNode { self.currentCornerRadius = cornerRadius var rotationAngle: CGFloat - if isOutgoing { + if isOutgoing && isCompactLayout { rotationAngle = CGFloat.pi / 2.0 } else { switch self.currentOrientation { @@ -181,9 +181,17 @@ private final class CallVideoNode: ASDisplayNode { case .rotation90: rotationAngle = CGFloat.pi / 2.0 case .rotation180: - rotationAngle = CGFloat.pi + if isCompactLayout { + rotationAngle = CGFloat.pi + } else { + rotationAngle = 0.0 + } case .rotation270: - rotationAngle = -CGFloat.pi / 2.0 + if isCompactLayout { + rotationAngle = -CGFloat.pi / 2.0 + } else { + rotationAngle = CGFloat.pi / 2.0 + } } var additionalAngle: CGFloat = 0.0 diff --git a/submodules/TgVoipWebrtc/tgcalls b/submodules/TgVoipWebrtc/tgcalls index 744762e065..b906b5a955 160000 --- a/submodules/TgVoipWebrtc/tgcalls +++ b/submodules/TgVoipWebrtc/tgcalls @@ -1 +1 @@ -Subproject commit 744762e065ddcde3a20c1c434fcc7c456aac3126 +Subproject commit b906b5a955f1e6e195cb91c4513d4cb7b3620ea6