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

@ -77,7 +77,7 @@ private struct DiaryRow: View {
var body: some View {
VStack(alignment: .leading, spacing: 8) {
HStack(alignment: .firstTextBaseline) {
if entry.isMilestone == true || entry.typ == "meilenstein" {
if entry.isMilestoneFlag || entry.typ == "meilenstein" {
Image(systemName: "star.fill").foregroundStyle(.orange)
}
if let titel = entry.titel, !titel.isEmpty {
@ -103,7 +103,7 @@ private struct DiaryRow: View {
.font(.caption)
.foregroundStyle(.tertiary)
}
if let media = entry.media, !media.isEmpty {
if let media = entry.mediaItems, !media.isEmpty {
ScrollView(.horizontal, showsIndicators: false) {
HStack(spacing: 6) {
ForEach(media) { m in