mirror of
https://github.com/yattee/yattee.git
synced 2024-12-13 22:00:31 +05:30
Fixed issue with portrait lock on launch (fix #274)
This commit is contained in:
parent
7cbb80847a
commit
4ea44a5267
@ -170,12 +170,6 @@ struct YatteeApp: App {
|
||||
SDImageCodersManager.shared.addCoder(SDImageWebPCoder.shared)
|
||||
SDWebImageManager.defaultImageCache = PINCache(name: "stream.yattee.app")
|
||||
|
||||
#if os(iOS)
|
||||
if Defaults[.lockPortraitWhenBrowsing] {
|
||||
Orientation.lockOrientation(.portrait, andRotateTo: .portrait)
|
||||
}
|
||||
#endif
|
||||
|
||||
if !Defaults[.lastAccountIsPublic] {
|
||||
accounts.configureAccount()
|
||||
}
|
||||
@ -243,5 +237,13 @@ struct YatteeApp: App {
|
||||
if player.presentingPlayer {
|
||||
player.presentingPlayer = false
|
||||
}
|
||||
|
||||
#if os(iOS)
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
||||
if Defaults[.lockPortraitWhenBrowsing] {
|
||||
Orientation.lockOrientation(.portrait, andRotateTo: .portrait)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user