From 14b894a2e9a3e730051dadb225146be973750441 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Tue, 13 Dec 2022 20:15:22 +0100 Subject: [PATCH] Fix unneeded binding --- Shared/Player/PlayerQueueRow.swift | 10 +--------- Shared/Player/Video Details/PlayerQueueView.swift | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Shared/Player/PlayerQueueRow.swift b/Shared/Player/PlayerQueueRow.swift index 4197f072..4c11ff6c 100644 --- a/Shared/Player/PlayerQueueRow.swift +++ b/Shared/Player/PlayerQueueRow.swift @@ -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 - init(item: PlayerQueueItem, history: Bool = false, autoplay: Bool = false, fullScreen: Binding = .constant(false)) { + init(item: PlayerQueueItem, history: Bool = false, autoplay: Bool = false) { self.item = item self.history = history self.autoplay = autoplay - _fullScreen = fullScreen _watchRequest = FetchRequest( 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() } diff --git a/Shared/Player/Video Details/PlayerQueueView.swift b/Shared/Player/Video Details/PlayerQueueView.swift index b36b69b5..bfd11fe2 100644 --- a/Shared/Player/Video Details/PlayerQueueView.swift +++ b/Shared/Player/Video Details/PlayerQueueView.swift @@ -86,7 +86,7 @@ struct PlayerQueueView: View { } ForEach(player.queue) { item in - PlayerQueueRow(item: item, fullScreen: $fullScreen) + PlayerQueueRow(item: item) .contextMenu { removeButton(item) removeAllButton() @@ -107,7 +107,7 @@ struct PlayerQueueView: View { if let related = player.currentVideo?.related, !related.isEmpty { Section(header: Text("Related")) { ForEach(related) { video in - PlayerQueueRow(item: PlayerQueueItem(video), fullScreen: $fullScreen) + PlayerQueueRow(item: PlayerQueueItem(video)) .contextMenu { VideoContextMenuView(video: video) }