Fix unneeded binding

This commit is contained in:
Arkadiusz Fal
2022-12-13 20:15:22 +01:00
parent 0517b4feea
commit 14b894a2e9
2 changed files with 3 additions and 11 deletions

View File

@@ -7,7 +7,6 @@ struct PlayerQueueRow: View {
let item: PlayerQueueItem
var history = false
var autoplay = false
@Binding var fullScreen: Bool
private var player = PlayerModel.shared
@@ -15,11 +14,10 @@ struct PlayerQueueRow: View {
@FetchRequest private var watchRequest: FetchedResults<Watch>
init(item: PlayerQueueItem, history: Bool = false, autoplay: Bool = false, fullScreen: Binding<Bool> = .constant(false)) {
init(item: PlayerQueueItem, history: Bool = false, autoplay: Bool = false) {
self.item = item
self.history = history
self.autoplay = autoplay
_fullScreen = fullScreen
_watchRequest = FetchRequest<Watch>(
entity: Watch.entity(),
sortDescriptors: [],
@@ -63,12 +61,6 @@ struct PlayerQueueRow: View {
player.advanceToItem(item, at: watchStoppedAt)
}
if fullScreen {
withAnimation {
fullScreen = false
}
}
if closePiPOnNavigation, player.playingInPictureInPicture {
player.closePiP()
}