merge fixes

This commit is contained in:
Ethan Pippin 2022-01-12 22:03:08 -07:00
parent cdc294dd96
commit 23da0ba273
3 changed files with 9 additions and 9 deletions

View File

@ -53,9 +53,9 @@ struct ItemLandscapeMainView: View {
.contextMenu { .contextMenu {
if viewModel.playButtonItem != nil, viewModel.item.userData?.playbackPositionTicks ?? 0 > 0 { if viewModel.playButtonItem != nil, viewModel.item.userData?.playbackPositionTicks ?? 0 > 0 {
Button { Button {
if let itemVideoPlayerViewModel = viewModel.selectedVideoPlayerViewModel { if let selectedVideoPlayerViewModel = viewModel.selectedVideoPlayerViewModel {
itemVideoPlayerViewModel.injectCustomValues(startFromBeginning: true) selectedVideoPlayerViewModel.injectCustomValues(startFromBeginning: true)
itemRouter.route(to: \.videoPlayer, itemVideoPlayerViewModel) itemRouter.route(to: \.videoPlayer, selectedVideoPlayerViewModel)
} else { } else {
LogManager.shared.log.error("Attempted to play item but no playback information available") LogManager.shared.log.error("Attempted to play item but no playback information available")
} }

View File

@ -113,8 +113,8 @@ struct PortraitHeaderOverlayView: View {
// MARK: Play // MARK: Play
Button { Button {
if let itemVideoPlayerViewModel = viewModel.itemVideoPlayerViewModel { if let selectedVideoPlayerViewModel = viewModel.selectedVideoPlayerViewModel {
itemRouter.route(to: \.videoPlayer, itemVideoPlayerViewModel) itemRouter.route(to: \.videoPlayer, selectedVideoPlayerViewModel)
} else { } else {
LogManager.shared.log.error("Attempted to play item but no playback information available") LogManager.shared.log.error("Attempted to play item but no playback information available")
} }
@ -132,13 +132,13 @@ struct PortraitHeaderOverlayView: View {
.background(viewModel.playButtonItem == nil ? Color(UIColor.secondarySystemFill) : Color.jellyfinPurple) .background(viewModel.playButtonItem == nil ? Color(UIColor.secondarySystemFill) : Color.jellyfinPurple)
.cornerRadius(10) .cornerRadius(10)
} }
.disabled(viewModel.playButtonItem == nil) .disabled(viewModel.playButtonItem == nil || viewModel.selectedVideoPlayerViewModel == nil)
.contextMenu { .contextMenu {
if viewModel.playButtonItem != nil, viewModel.item.userData?.playbackPositionTicks ?? 0 > 0 { if viewModel.playButtonItem != nil, viewModel.item.userData?.playbackPositionTicks ?? 0 > 0 {
Button { Button {
if let itemVideoPlayerViewModel = viewModel.itemVideoPlayerViewModel { if let selectedVideoPlayerViewModel = viewModel.selectedVideoPlayerViewModel {
itemVideoPlayerViewModel.injectCustomValues(startFromBeginning: true) selectedVideoPlayerViewModel.injectCustomValues(startFromBeginning: true)
itemRouter.route(to: \.videoPlayer, itemVideoPlayerViewModel) itemRouter.route(to: \.videoPlayer, selectedVideoPlayerViewModel)
} else { } else {
LogManager.shared.log.error("Attempted to play item but no playback information available") LogManager.shared.log.error("Attempted to play item but no playback information available")
} }