diff --git a/src/ui/notify.js b/src/ui/notify.js index cc1677d..34b26b0 100644 --- a/src/ui/notify.js +++ b/src/ui/notify.js @@ -1,6 +1,4 @@ -import { esc } from '../utils.js'; -// Circular — safe (only used inside function bodies) -import { navigate } from '../views/views.js'; +import { esc, toast } from '../utils.js'; import { api } from '../api.js'; const _NOTIF_KEY = 'ns_notifications'; @@ -108,6 +106,8 @@ export async function _notifNavigate(notifId) { panel?.classList.remove('open'); overlay?.classList.remove('active'); + const { navigate } = await import('../views/views.js'); + if (n.navType === 'playlist' && n.navId) { navigate('playlist-detail', { id: n.navId, name: n.navName || n.title.replace(/^Playlist:\s*/, '') }); return; @@ -130,7 +130,7 @@ export async function _notifNavigate(notifId) { } } catch {} } - import('../utils.js').then(m => m.toast('Album nicht gefunden — Library-Scan nötig?')); + toast('Album nicht gefunden — Library-Scan nötig?'); return; } @@ -141,6 +141,6 @@ export async function _notifNavigate(notifId) { const match = artists.find(a => norm(a.name) === norm(n.navArtist)) || artists[0]; if (match) { navigate('artist-detail', { id: match.id, name: match.name }); return; } } catch {} - import('../utils.js').then(m => m.toast('Künstler nicht gefunden — Library-Scan nötig?')); + toast('Künstler nicht gefunden — Library-Scan nötig?'); } }