mirror of
https://github.com/dscyrescotti/Memola.git
synced 2026-04-24 17:48:39 +02:00
feat: update updated date of memo when if there are changes
This commit is contained in:
@@ -14,6 +14,9 @@ struct MemolaApp: App {
|
||||
MemosView()
|
||||
.persistence(\.viewContext)
|
||||
.onReceive(NotificationCenter.default.publisher(for: UIApplication.willTerminateNotification)) { _ in
|
||||
withPersistenceSync(\.viewContext) { context in
|
||||
try context.saveIfNeeded()
|
||||
}
|
||||
withPersistenceSync(\.backgroundContext) { context in
|
||||
try context.saveIfNeeded()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user