Skip to content

Commit c16de1f

Browse files
author
Ali
committed
Fix iPad rotation
1 parent ece4f6e commit c16de1f

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

submodules/TelegramCallsUI/Sources/CallControllerNode.swift

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ private final class CallVideoNode: ASDisplayNode {
172172
self.currentCornerRadius = cornerRadius
173173

174174
var rotationAngle: CGFloat
175-
if isOutgoing {
175+
if isOutgoing && isCompactLayout {
176176
rotationAngle = CGFloat.pi / 2.0
177177
} else {
178178
switch self.currentOrientation {
@@ -181,9 +181,17 @@ private final class CallVideoNode: ASDisplayNode {
181181
case .rotation90:
182182
rotationAngle = CGFloat.pi / 2.0
183183
case .rotation180:
184-
rotationAngle = CGFloat.pi
184+
if isCompactLayout {
185+
rotationAngle = CGFloat.pi
186+
} else {
187+
rotationAngle = 0.0
188+
}
185189
case .rotation270:
186-
rotationAngle = -CGFloat.pi / 2.0
190+
if isCompactLayout {
191+
rotationAngle = -CGFloat.pi / 2.0
192+
} else {
193+
rotationAngle = CGFloat.pi / 2.0
194+
}
187195
}
188196

189197
var additionalAngle: CGFloat = 0.0

submodules/TgVoipWebrtc/tgcalls

0 commit comments

Comments
 (0)