mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-07-05 20:41:35 +02:00
bug: fix stroke glitching
This commit is contained in:
@@ -13,6 +13,11 @@ struct MemolaApp: App {
|
||||
WindowGroup {
|
||||
MemosView()
|
||||
.persistence(\.viewContext)
|
||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willTerminateNotification)) { _ in
|
||||
withPersistenceSync(\.backgroundContext) { context in
|
||||
try context.saveIfNeeded()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user