main
swift 26 lines 580 Bytes
Raw
1 //
2 // PosterItem.swift
3 // JomloCollectionView Example
4 //
5 // Created by Seto Elkahfi on 2026-01-27.
6 // Copyright © 2026 Seto Elkahfi. All rights reserved.
7 //
8
9 import JomloCollectionView
10
11 struct PosterItem: JomloItem, @unchecked Sendable {
12 let id: String
13 let title: String
14 let year: String
15 let colorHex: String
16
17 nonisolated var itemIdentifier: String { id }
18
19 nonisolated static func == (lhs: PosterItem, rhs: PosterItem) -> Bool {
20 lhs.id == rhs.id
21 }
22
23 nonisolated func hash(into hasher: inout Hasher) {
24 hasher.combine(id)
25 }
26 }