diff --git a/Memola/Canvas/History/History.swift b/Memola/Canvas/History/History.swift index 9cbf6c8..83dc934 100644 --- a/Memola/Canvas/History/History.swift +++ b/Memola/Canvas/History/History.swift @@ -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()