mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Call PostListModel.remove() async on main queue
This commit is contained in:
parent
d129c0d0f9
commit
01bfe7e74a
@ -20,7 +20,7 @@ struct ContentView: View {
|
||||
primaryButton: .destructive(Text("Delete"), action: {
|
||||
if let postToDelete = model.postToDelete {
|
||||
model.selectedPost = nil
|
||||
withAnimation {
|
||||
DispatchQueue.main.async {
|
||||
model.posts.remove(postToDelete)
|
||||
}
|
||||
model.postToDelete = nil
|
||||
|
Loading…
Reference in New Issue
Block a user