mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Performance improvements
This commit is contained in:
@@ -136,12 +136,7 @@ struct PlayerControls: View {
|
||||
}
|
||||
.onChange(of: model.presentingOverlays) { newValue in
|
||||
if newValue {
|
||||
player.backend.stopControlsUpdates()
|
||||
} else {
|
||||
#if os(tvOS)
|
||||
focusedField = .play
|
||||
#endif
|
||||
player.backend.startControlsUpdates()
|
||||
model.hide()
|
||||
}
|
||||
}
|
||||
#if os(tvOS)
|
||||
|
@@ -103,7 +103,7 @@ struct VideoDescription: View {
|
||||
}
|
||||
|
||||
func updateUIView(_: UIViewType, context _: Context) {
|
||||
customizeLabel()
|
||||
updatePreferredMaxLayoutWidth()
|
||||
}
|
||||
|
||||
func customizeLabel() {
|
||||
@@ -143,6 +143,10 @@ struct VideoDescription: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func updatePreferredMaxLayoutWidth() {
|
||||
label.preferredMaxLayoutWidth = (detailsSize?.width ?? 330) - 30
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -454,10 +454,9 @@ struct VideoPlayerView: View {
|
||||
if drag > 60,
|
||||
player.playingFullScreen
|
||||
{
|
||||
player.exitFullScreen()
|
||||
player.exitFullScreen(showControls: false)
|
||||
if Defaults[.rotateToPortraitOnExitFullScreen] {
|
||||
Orientation.lockOrientation(.allButUpsideDown, andRotateTo: .portrait)
|
||||
playerControls.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user