Tagebuch-Decode-Fix: media_items statt media, is_milestone als Int 0/1

Backend liefert das Foto-Array unter 'media_items' (in _entry_dict),
nicht 'media'. Außerdem ist is_milestone wieder eine SQLite-Int-Spalte
0/1 — der bekannte Bool-Quirk. Mit Bool? in der DTO bricht die Decoder
ab und die ganze Liste verschwindet stillschweigend in den Fehler-Zustand.
This commit is contained in:
rene 2026-05-30 12:35:50 +02:00
parent ef7907d74b
commit 3373305b23
2 changed files with 7 additions and 4 deletions

View file

@ -204,9 +204,12 @@ struct DiaryEntry: Decodable, Identifiable {
let gpsLat: Double?
let gpsLon: Double?
let locationName: String?
let isMilestone: Bool?
let media: [DiaryMedia]?
// is_milestone kommt als SQLite-Int 0/1 Backend bool-konvertiert es nicht.
let isMilestone: Int?
let mediaItems: [DiaryMedia]?
let createdAt: String?
var isMilestoneFlag: Bool { isMilestone == 1 }
}
struct DiaryMedia: Decodable, Identifiable {