Update setting on main actor to avoid crashes
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
1 parent
739a3a0b8c
commit
46c3667ec3
1 file changed
+3
-1
@@ -257,7 +257,9 @@ class Drafts: ObservableObject {
|
||||
damus_state.nostrNetwork.sendToNostrDB(event: draft_event)
|
||||
}
|
||||
|
||||
damus_state.settings.draft_event_ids = draft_events.map({ $0.id.hex() })
|
||||
DispatchQueue.main.async {
|
||||
damus_state.settings.draft_event_ids = draft_events.map({ $0.id.hex() })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user