fix: hide notification bell icon when notifications are disabled

Also closes the notification drawer if it was open when the user
disables notifications in settings.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-24 02:17:27 +01:00
co-authored by Claude Opus 4.5
parent 582daf838c
commit 1fb1007211
+12
View File
@@ -2589,6 +2589,18 @@ class ClaudemanApp {
if (tokenCountEl) {
tokenCountEl.style.display = showTokenCount ? '' : 'none';
}
// Hide notification bell when notifications are disabled
const notifEnabled = this.notificationManager?.preferences?.enabled ?? true;
const notifBtn = document.querySelector('.btn-notifications');
if (notifBtn) {
notifBtn.style.display = notifEnabled ? '' : 'none';
}
// Close the drawer if notifications got disabled while it's open
if (!notifEnabled) {
const drawer = document.getElementById('notifDrawer');
if (drawer) drawer.classList.remove('open');
}
}
applyMonitorVisibility() {