Fix: Notifications-Klick-Handler durch UI.toast-TypeError blockiert

UI.toast ist ein Objekt {success,error,info}, kein Funktion.
UI.toast?.('...','info') wirft TypeError → async handler crasht still
→ setTimeout(_execNav) wird nie ausgeführt → keine Navigation

Fix: UI.toast?.info?.(…) / UI.toast?.error?.(…)
This commit is contained in:
rene 2026-04-19 10:16:46 +02:00
parent bb0250a8b5
commit 90f1c4e299
3 changed files with 5 additions and 5 deletions

View file

@ -183,7 +183,7 @@ window.Page_notifications = (() => {
items = items.map(n => ({ ...n, read_at: new Date().toISOString() }));
_render(items);
} catch (e) {
UI.toast?.('Fehler beim Markieren.', 'error');
UI.toast?.error?.('Fehler beim Markieren.');
}
});
}
@ -223,7 +223,7 @@ window.Page_notifications = (() => {
API.notifications.read(id).catch(() => {});
if (nav.page) {
if (nav.label) UI.toast?.(`Öffne ${nav.label}`, 'info');
if (nav.label) UI.toast?.info?.(`Öffne ${nav.label}`);
setTimeout(() => _execNav(nav), 150);
} else {
setTimeout(() => { el.style.opacity = ''; }, 800);
@ -261,7 +261,7 @@ window.Page_notifications = (() => {
item.style.opacity = '';
item.style.transform = '';
}
UI.toast?.('Löschen fehlgeschlagen.', 'error');
UI.toast?.error?.('Löschen fehlgeschlagen.');
}
});
});