Fix iPad rotation

This commit is contained in:
Ali 2020-08-24 23:44:59 +01:00
parent ece4f6ed86
commit c16de1fcd9
2 changed files with 12 additions and 4 deletions

View File

@ -172,7 +172,7 @@ private final class CallVideoNode: ASDisplayNode {
self.currentCornerRadius = cornerRadius self.currentCornerRadius = cornerRadius
var rotationAngle: CGFloat var rotationAngle: CGFloat
if isOutgoing { if isOutgoing && isCompactLayout {
rotationAngle = CGFloat.pi / 2.0 rotationAngle = CGFloat.pi / 2.0
} else { } else {
switch self.currentOrientation { switch self.currentOrientation {
@ -181,9 +181,17 @@ private final class CallVideoNode: ASDisplayNode {
case .rotation90: case .rotation90:
rotationAngle = CGFloat.pi / 2.0 rotationAngle = CGFloat.pi / 2.0
case .rotation180: case .rotation180:
rotationAngle = CGFloat.pi if isCompactLayout {
rotationAngle = CGFloat.pi
} else {
rotationAngle = 0.0
}
case .rotation270: 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 var additionalAngle: CGFloat = 0.0

@ -1 +1 @@
Subproject commit 744762e065ddcde3a20c1c434fcc7c456aac3126 Subproject commit b906b5a955f1e6e195cb91c4513d4cb7b3620ea6