mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Filter out local posts from postsToDelete array
This commit is contained in:
parent
4c9f5d3348
commit
148deaf911
@ -245,7 +245,7 @@ private extension WriteFreelyModel {
|
||||
|
||||
func fetchUserPostsHandler(result: Result<[WFPost], Error>) {
|
||||
do {
|
||||
var postsToDelete = posts.userPosts
|
||||
var postsToDelete = posts.userPosts.filter { $0.status != PostStatus.local.rawValue }
|
||||
let fetchedPosts = try result.get()
|
||||
for fetchedPost in fetchedPosts {
|
||||
if let managedPost = posts.userPosts.first(where: { $0.postId == fetchedPost.postId }) {
|
||||
|
Loading…
Reference in New Issue
Block a user