mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-07-13 16:22:49 +02:00
feat: remove redo items in main thread
This commit is contained in:
@@ -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
|
withPersistence(\.viewContext) { [weak memo] context in
|
||||||
memo?.updatedAt = .now
|
memo?.updatedAt = .now
|
||||||
try context.saveIfNeeded()
|
try context.saveIfNeeded()
|
||||||
|
|||||||
Reference in New Issue
Block a user