Fix data desync on update.
This commit is contained in:
parent
2857b1cd55
commit
b681f331ba
@ -235,12 +235,11 @@ import MVMCore
|
||||
formValidator = FormValidator(rules)
|
||||
}
|
||||
|
||||
// Notify the manager of new data
|
||||
manager?.newDataReceived?(in: self)
|
||||
updateUI()
|
||||
|
||||
Task { @MainActor in
|
||||
updateUI()
|
||||
}
|
||||
// Notify the manager of new data.
|
||||
// Warning: Some flows cause table reloads. Until the UI update is decoupled, should be after the updateUI.
|
||||
manager?.newDataReceived?(in: self)
|
||||
}
|
||||
|
||||
/// Applies the latest model to the UI.
|
||||
@ -521,7 +520,7 @@ import MVMCore
|
||||
return model
|
||||
}
|
||||
if replacedModels.count > 0 {
|
||||
Task { @MainActor in
|
||||
DispatchQueue.main.sync {
|
||||
self.updateUI(for: replacedModels)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user