This commit is contained in:
Trey t
2025-12-09 23:37:04 -06:00
parent 3a10b4b8d6
commit f2565678be
1587 changed files with 7747 additions and 647 deletions

View File

@@ -0,0 +1,24 @@
//
// PersistenceUPDATE.swift
// Feels
//
// Created by Trey Tartt on 2/18/22.
//
import Foundation
extension PersistenceController {
@discardableResult
public func update(entryDate: Date, withModd mood: Mood) -> Bool {
guard let existingEntry = getEntry(byDate: entryDate) else {
return false
}
existingEntry.setValue(mood.rawValue, forKey: "moodValue")
saveAndRunDataListerners()
EventLogger.log(event: "update_entry")
return true
}
}