mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-11-23 17:04:04 +01:00
feat: remove redo items in main thread
This commit is contained in:
1 parent
ae91b69f88
commit
4807ef1162
1 file changed
+3
-1
@@ -100,7 +100,9 @@ final class History: ObservableObject {
|
||||
}
|
||||
}
|
||||
}
|
||||
redoStack.removeAll()
|
||||
DispatchQueue.main.async { [weak self] in
|
||||
self?.redoStack.removeAll()
|
||||
}
|
||||
withPersistence(\.viewContext) { [weak memo] context in
|
||||
memo?.updatedAt = .now
|
||||
try context.saveIfNeeded()
|
||||
|
||||
Reference in new issue
Block a user