Fix SwiftLint error about function body length

This commit is contained in:
Angelo Stavrow 2020-10-29 17:05:01 -04:00
parent e7408a47e9
commit 518d793d5d
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

View File

@ -348,9 +348,7 @@ private extension WriteFreelyModel {
if let fetchedPostUpdatedDate = fetchedPost.updatedDate,
let localPostUpdatedDate = managedPost.updatedDate {
managedPost.hasNewerRemoteCopy = fetchedPostUpdatedDate > localPostUpdatedDate
} else {
print("Error: could not determine which copy of post is newer")
}
} else { print("Error: could not determine which copy of post is newer") }
postsToDelete.removeAll(where: { $0.postId == fetchedPost.postId })
}
} else {
@ -372,9 +370,7 @@ private extension WriteFreelyModel {
}
}
DispatchQueue.main.async {
for post in postsToDelete {
post.wasDeletedFromServer = true
}
for post in postsToDelete { post.wasDeletedFromServer = true }
LocalStorageManager().saveContext()
}
} catch {