ContactTrickDataFlow.swift 586 B

12345678910111213141516171819202122232425262728
  1. import Combine
  2. import Foundation
  3. enum ContactTrick {
  4. enum Config {}
  5. class Item: Identifiable, Hashable, Equatable {
  6. let id = UUID()
  7. var index: Int = 0
  8. var entry: ContactTrickEntry
  9. init(index: Int, entry: ContactTrickEntry) {
  10. self.index = index
  11. self.entry = entry
  12. }
  13. static func == (lhs: Item, rhs: Item) -> Bool {
  14. lhs.index == rhs.index
  15. }
  16. func hash(into hasher: inout Hasher) {
  17. hasher.combine(index)
  18. }
  19. }
  20. }
  21. protocol ContactTrickProvider: Provider {}