Call updateFromServer() after moving the post

This commit is contained in:
Angelo Stavrow 2020-10-16 13:47:39 -04:00
parent 22109a47d7
commit 404d557cab
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

View File

@ -386,6 +386,7 @@ private extension WriteFreelyModel {
cachedPost.hasNewerRemoteCopy = false
DispatchQueue.main.async {
LocalStorageManager().saveContext()
self.posts.loadCachedPosts()
}
} catch {
print(error)
@ -396,9 +397,10 @@ private extension WriteFreelyModel {
do {
let succeeded = try result.get()
if succeeded {
DispatchQueue.main.async {
LocalStorageManager().saveContext()
self.posts.loadCachedPosts()
if let post = selectedPost {
updateFromServer(post: post)
} else {
return
}
}
} catch {