mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 11:50:56 +00:00
Wallet: fixed QR scanner orientation on iPads
This commit is contained in:
parent
354be3e424
commit
11a4d6d5f8
@ -613,7 +613,7 @@ final class SharedApplicationContext {
|
|||||||
}, getAvailableAlternateIcons: {
|
}, getAvailableAlternateIcons: {
|
||||||
if #available(iOS 10.3, *) {
|
if #available(iOS 10.3, *) {
|
||||||
var icons = [PresentationAppIcon(name: "Blue", imageName: "BlueIcon", isDefault: buildConfig.isAppStoreBuild),
|
var icons = [PresentationAppIcon(name: "Blue", imageName: "BlueIcon", isDefault: buildConfig.isAppStoreBuild),
|
||||||
PresentationAppIcon(name: "Black", imageName: "BlackIcon", isDefault: buildConfig.isInternalBuild),
|
PresentationAppIcon(name: "Black", imageName: "BlackIcon"),
|
||||||
PresentationAppIcon(name: "BlueClassic", imageName: "BlueClassicIcon"),
|
PresentationAppIcon(name: "BlueClassic", imageName: "BlueClassicIcon"),
|
||||||
PresentationAppIcon(name: "BlackClassic", imageName: "BlackClassicIcon"),
|
PresentationAppIcon(name: "BlackClassic", imageName: "BlackClassicIcon"),
|
||||||
PresentationAppIcon(name: "BlueFilled", imageName: "BlueFilledIcon"),
|
PresentationAppIcon(name: "BlueFilled", imageName: "BlueFilledIcon"),
|
||||||
|
|||||||
@ -296,14 +296,10 @@ private final class WalletQrScanScreenNode: ViewControllerTracingNode, UIScrollV
|
|||||||
let bounds = CGRect(origin: CGPoint(), size: layout.size)
|
let bounds = CGRect(origin: CGPoint(), size: layout.size)
|
||||||
|
|
||||||
if case .tablet = layout.deviceMetrics.type {
|
if case .tablet = layout.deviceMetrics.type {
|
||||||
if case .landscape = layout.orientation {
|
|
||||||
let rotation: CGFloat
|
|
||||||
if UIDevice.current.orientation == .landscapeLeft {
|
if UIDevice.current.orientation == .landscapeLeft {
|
||||||
rotation = CGFloat.pi / 2.0
|
|
||||||
} else {
|
|
||||||
rotation = -CGFloat.pi / 2.0
|
|
||||||
}
|
|
||||||
self.previewNode.transform = CATransform3DMakeRotation(CGFloat.pi / 2.0, 0.0, 0.0, 1.0)
|
self.previewNode.transform = CATransform3DMakeRotation(CGFloat.pi / 2.0, 0.0, 0.0, 1.0)
|
||||||
|
} else if UIDevice.current.orientation == .landscapeRight {
|
||||||
|
self.previewNode.transform = CATransform3DMakeRotation(-CGFloat.pi / 2.0, 0.0, 0.0, 1.0)
|
||||||
} else {
|
} else {
|
||||||
self.previewNode.transform = CATransform3DIdentity
|
self.previewNode.transform = CATransform3DIdentity
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user