mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 17:55:26 -04:00
Email reminder bell: re-evaluate visibility live on settings change
The bell is already gated on settings.reminder_channel === 'email', but
the check only ran at email-library init — so switching the reminder
channel in Settings didn't update the bell until you reopened Email.
- Settings/Reminders channel-change handler now dispatches
odysseus-reminder-channel-changed { channel } after saving.
- emailLibrary listens for it and re-runs _syncEmailReminderBellVisibility
with the new channel value.
This commit is contained in:
@@ -321,6 +321,12 @@ async function _loadEmailReminderBellVisibility() {
|
||||
_syncEmailReminderBellVisibility(false);
|
||||
}
|
||||
}
|
||||
// Live-update the bell when the reminder channel changes in Settings,
|
||||
// so the user doesn't have to reopen Email to see the change apply.
|
||||
window.addEventListener('odysseus-reminder-channel-changed', (e) => {
|
||||
const ch = e?.detail?.channel;
|
||||
_syncEmailReminderBellVisibility(ch === 'email');
|
||||
});
|
||||
|
||||
function _readCssPx(name) {
|
||||
const v = getComputedStyle(document.documentElement).getPropertyValue(name);
|
||||
|
||||
Reference in New Issue
Block a user