mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Call updateFromServer() after moving the post
This commit is contained in:
parent
22109a47d7
commit
404d557cab
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user