summaryrefslogtreecommitdiff
path: root/Sora/Data/PostWithContext.swift
blob: b98a1910f9e41e348765eaa688daf8c61cd6e02b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import Foundation

struct PostWithContext: Hashable {
  let post: BooruPost
  // swiftlint:disable:next discouraged_optional_collection
  let posts: [BooruPost]?

  func hash(into hasher: inout Hasher) {
    hasher.combine(post.id)
  }

  static func == (lhs: Self, rhs: Self) -> Bool {
    lhs.post.id == rhs.post.id
  }
}