diff --git a/Shared/Videos/VideoCell.swift b/Shared/Videos/VideoCell.swift index c4760106..000867ac 100644 --- a/Shared/Videos/VideoCell.swift +++ b/Shared/Videos/VideoCell.swift @@ -4,6 +4,7 @@ import SDWebImageSwiftUI import SwiftUI struct VideoCell: View { + var id: String? private var video: Video @Environment(\.horizontalCells) private var horizontalCells @@ -30,7 +31,8 @@ struct VideoCell: View { @FetchRequest private var watchRequest: FetchedResults - init(video: Video) { + init(id: String? = nil, video: Video) { + self.id = id self.video = video _watchRequest = video.watchFetchRequest } @@ -52,7 +54,7 @@ struct VideoCell: View { .contextMenu { VideoContextMenuView(video: video) } - .id(video.videoID) + .id(id ?? video.videoID) } private var thumbnailRoundingCornerRadius: Double { diff --git a/Shared/Views/PlaceholderCell.swift b/Shared/Views/PlaceholderCell.swift index 88b6d5bb..a17cd27e 100644 --- a/Shared/Views/PlaceholderCell.swift +++ b/Shared/Views/PlaceholderCell.swift @@ -3,7 +3,7 @@ import SwiftUI struct PlaceholderCell: View { var body: some View { - VideoCell(video: .fixture) + VideoCell(id: UUID().uuidString, video: .fixture) .redacted(reason: .placeholder) } }