summaryrefslogtreecommitdiff
path: root/Sora/Data/PostWithContext.swift
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-08-28 15:14:10 -0700
committerFuwn <[email protected]>2025-08-28 15:14:10 -0700
commita741e13d18a0927e984dfb6eb3d760f49afe3896 (patch)
tree34ba76fddeb26c80d902e7c1790a7fd192a52ff3 /Sora/Data/PostWithContext.swift
parentfeat: Development commit (diff)
downloadsora-testing-a741e13d18a0927e984dfb6eb3d760f49afe3896.tar.xz
sora-testing-a741e13d18a0927e984dfb6eb3d760f49afe3896.zip
feat: Development commit
Diffstat (limited to 'Sora/Data/PostWithContext.swift')
-rw-r--r--Sora/Data/PostWithContext.swift19
1 files changed, 19 insertions, 0 deletions
diff --git a/Sora/Data/PostWithContext.swift b/Sora/Data/PostWithContext.swift
new file mode 100644
index 0000000..c8cb2f6
--- /dev/null
+++ b/Sora/Data/PostWithContext.swift
@@ -0,0 +1,19 @@
+import Foundation
+
+struct PostWithContext: Hashable {
+ let post: BooruPost
+ let posts: [BooruPost]?
+
+ init(post: BooruPost, posts: [BooruPost]?) {
+ self.post = post
+ self.posts = posts
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine(post.id)
+ }
+
+ static func == (lhs: PostWithContext, rhs: PostWithContext) -> Bool {
+ lhs.post.id == rhs.post.id
+ }
+}