diff --git a/Shared/Models/PostStore.swift b/Shared/Models/PostStore.swift index e7935fe..8e4d288 100644 --- a/Shared/Models/PostStore.swift +++ b/Shared/Models/PostStore.swift @@ -1,17 +1,21 @@ import Foundation struct PostStore { var posts: [Post] init(posts: [Post] = []) { self.posts = posts } mutating func add(_ post: Post) { posts.append(post) } - mutating func purge() { + mutating func purgeAllPosts() { posts = [] } + + mutating func purgeRemotePosts() { + posts = posts.filter { $0.wfPost.postId == nil } + } }