mirror of
https://github.com/yattee/yattee.git
synced 2025-08-04 01:34:10 +00:00
Use cache for loading player queue and history
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct HistoryView: View {
|
||||
static let detailsPreloadLimit = 50
|
||||
|
||||
var limit = 10
|
||||
|
||||
@FetchRequest(sortDescriptors: [.init(key: "watchedAt", ascending: false)])
|
||||
@@ -33,7 +31,6 @@ struct HistoryView: View {
|
||||
}
|
||||
.onAppear {
|
||||
visibleWatches
|
||||
.prefix(Self.detailsPreloadLimit)
|
||||
.forEach(player.loadHistoryVideoDetails)
|
||||
}
|
||||
#if os(tvOS)
|
||||
|
@@ -86,9 +86,6 @@ struct PlayerQueueView: View {
|
||||
|
||||
ForEach(player.queue) { item in
|
||||
PlayerQueueRow(item: item, fullScreen: $fullScreen)
|
||||
.onAppear {
|
||||
player.loadQueueVideoDetails(item)
|
||||
}
|
||||
.contextMenu {
|
||||
removeButton(item)
|
||||
removeAllButton()
|
||||
|
Reference in New Issue
Block a user