diff options
| author | Fuwn <[email protected]> | 2025-08-28 15:23:28 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-08-28 15:23:28 -0700 |
| commit | d7af80d2d1edcc45c043bb237c098c4cb0c026fa (patch) | |
| tree | c9775296945ce4b38e611d59e586000675f3d44c /Sora/Data | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-d7af80d2d1edcc45c043bb237c098c4cb0c026fa.tar.xz sora-testing-d7af80d2d1edcc45c043bb237c098c4cb0c026fa.zip | |
feat: Development commit
Diffstat (limited to 'Sora/Data')
| -rw-r--r-- | Sora/Data/Booru/BooruManager.swift | 2 | ||||
| -rw-r--r-- | Sora/Data/PostWithContext.swift | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/Sora/Data/Booru/BooruManager.swift b/Sora/Data/Booru/BooruManager.swift index 5160c9d..b5b5ea7 100644 --- a/Sora/Data/Booru/BooruManager.swift +++ b/Sora/Data/Booru/BooruManager.swift @@ -102,7 +102,7 @@ class BooruManager: ObservableObject { // swiftlint:disable:this type_body_leng let provider = self.provider let newPosts = await withCheckedContinuation { continuation in DispatchQueue.global(qos: .userInitiated).async { - let parsedPosts = BooruManager.parsePosts( + let parsedPosts = Self.parsePosts( from: data, flavor: flavor, provider: provider diff --git a/Sora/Data/PostWithContext.swift b/Sora/Data/PostWithContext.swift index c8cb2f6..b98a191 100644 --- a/Sora/Data/PostWithContext.swift +++ b/Sora/Data/PostWithContext.swift @@ -2,18 +2,14 @@ import Foundation struct PostWithContext: Hashable { let post: BooruPost + // swiftlint:disable:next discouraged_optional_collection 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 { + static func == (lhs: Self, rhs: Self) -> Bool { lhs.post.id == rhs.post.id } } |