From e775d9e0165c481c6ca6193946173186c2272139 Mon Sep 17 00:00:00 2001 From: dscyrescotti Date: Tue, 11 Jun 2024 00:19:11 +0700 Subject: [PATCH] refactor: clean up --- Memola/Canvas/Contexts/GraphicContext.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Memola/Canvas/Contexts/GraphicContext.swift b/Memola/Canvas/Contexts/GraphicContext.swift index 38dc787..37c637c 100644 --- a/Memola/Canvas/Contexts/GraphicContext.swift +++ b/Memola/Canvas/Contexts/GraphicContext.swift @@ -48,7 +48,7 @@ final class GraphicContext: @unchecked Sendable { switch stroke.style { case .marker: guard let penStroke = stroke.stroke(as: PenStroke.self) else { return } - let deletedStroke = tree.remove(penStroke.anyStroke, in: penStroke.strokeBox) + tree.remove(penStroke.anyStroke, in: penStroke.strokeBox) withPersistence(\.backgroundContext) { [weak penStroke] context in penStroke?.object?.graphicContext = nil try context.saveIfNeeded()