mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +00:00
Minor improvements
This commit is contained in:
parent
d80929bd88
commit
16e365ce6c
@ -91,8 +91,6 @@ extension PlayerModel {
|
||||
watch.watchedAt = Date()
|
||||
|
||||
try? self.backgroundContext.save()
|
||||
|
||||
FeedModel.shared.calculateUnwatchedFeed()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -664,6 +664,10 @@ final class PlayerModel: ObservableObject {
|
||||
}
|
||||
|
||||
func handleCurrentItemChange() {
|
||||
if currentItem == nil {
|
||||
FeedModel.shared.calculateUnwatchedFeed()
|
||||
}
|
||||
|
||||
#if os(macOS)
|
||||
Windows.player.window?.title = windowTitle
|
||||
#endif
|
||||
|
@ -35,7 +35,7 @@ final class WatchNextViewModel: ObservableObject {
|
||||
static let shared = WatchNextViewModel()
|
||||
|
||||
@Published var item: PlayerQueueItem?
|
||||
@Published private(set) var isPresenting = true
|
||||
@Published private(set) var isPresenting = false
|
||||
@Published var reason: PresentationReason?
|
||||
@Published var page = Page.queue
|
||||
|
||||
|
@ -21,20 +21,18 @@ struct PlayerOverlayModifier: ViewModifier {
|
||||
|
||||
@ViewBuilder var overlay: some View {
|
||||
Group {
|
||||
if player.videoForDisplay != nil {
|
||||
ControlsBar(fullScreen: .constant(false), expansionState: $expansionState, playerBar: true)
|
||||
.offset(x: expansionState == .mini && !controlsWhenMinimized ? 10 : 0, y: 0)
|
||||
.transition(.opacity)
|
||||
.frame(maxWidth: maxWidth, alignment: .trailing)
|
||||
.onAppear {
|
||||
if playerButtonIsExpanded {
|
||||
expansionState = .full
|
||||
}
|
||||
}
|
||||
.animation(.easeIn, value: player.videoForDisplay)
|
||||
.opacity(player.videoForDisplay == nil ? 0 : 1)
|
||||
}
|
||||
}
|
||||
.animation(.default, value: player.currentItem)
|
||||
}
|
||||
|
||||
var maxWidth: Double {
|
||||
playerBarMaxWidth == "0" ? .infinity : (Double(playerBarMaxWidth) ?? 600)
|
||||
|
@ -76,7 +76,7 @@ struct AppSidebarNavigation: View {
|
||||
}
|
||||
}
|
||||
|
||||
ToolbarItemGroup {
|
||||
ToolbarItemGroup(placement: accountsMenuToolbarItemPlacement) {
|
||||
AccountViewButton()
|
||||
}
|
||||
|
||||
|
@ -120,6 +120,7 @@ struct VideoDetails: View {
|
||||
}
|
||||
.modifier(SettingsPickerModifier())
|
||||
.offset(x: 15, y: 5)
|
||||
.opacity(descriptionVisibility ? 1 : 0)
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -214,7 +215,7 @@ struct VideoDetails: View {
|
||||
)
|
||||
)
|
||||
.zIndex(0)
|
||||
.frame(maxHeight: 15)
|
||||
.frame(maxHeight: 25)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ struct WatchNextView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationViewStyle(.stack)
|
||||
#else
|
||||
VStack {
|
||||
HStack {
|
||||
@ -221,7 +222,7 @@ struct WatchNextView: View {
|
||||
Divider()
|
||||
}
|
||||
|
||||
let queueForMoreVideos = player.queue.isEmpty ? [] : player.queue.suffix(from: player.playbackMode == .queue ? 1 : 0)
|
||||
let queueForMoreVideos = player.queue.isEmpty ? [] : player.queue.suffix(from: player.playbackMode == .queue && model.isAutoplaying && model.canAutoplay ? 1 : 0)
|
||||
|
||||
if (model.isAutoplaying && model.canAutoplay && !queueForMoreVideos.isEmpty) ||
|
||||
(!model.isAutoplaying && !queueForMoreVideos.isEmpty)
|
||||
|
Loading…
Reference in New Issue
Block a user