mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 00:08:21 +00:00
Fix content item view ID
This commit is contained in:
parent
9464809581
commit
8a43ed9503
@ -24,6 +24,8 @@ struct ContentItem: Identifiable {
|
||||
var playlist: ChannelPlaylist!
|
||||
var channel: Channel!
|
||||
|
||||
var id: String = UUID().uuidString
|
||||
|
||||
static func array(of videos: [Video]) -> [ContentItem] {
|
||||
videos.map { ContentItem(video: $0) }
|
||||
}
|
||||
@ -32,10 +34,6 @@ struct ContentItem: Identifiable {
|
||||
lhs.contentType < rhs.contentType
|
||||
}
|
||||
|
||||
var id: String {
|
||||
"\(contentType.rawValue)-\(video?.id ?? playlist?.id ?? channel?.id ?? "")"
|
||||
}
|
||||
|
||||
var contentType: ContentType {
|
||||
if !playlist.isNil {
|
||||
return .playlist
|
||||
|
Loading…
Reference in New Issue
Block a user