Add background mail checking and new mail notifications

This commit is contained in:
Laurent Dinclaux
2026-02-10 16:35:23 +11:00
parent 6ea4aee0a7
commit 12572b563d
21 changed files with 1095 additions and 69 deletions

View File

@@ -139,6 +139,17 @@ class IdentSwitchPreconfig
$record['ident_switch.form.common.readonly'] = $loginSet ? 2 : 1;
}
// Notification defaults from preconfig
if (isset($cfg['notify_check'])) {
$record['ident_switch.form.notify.check'] = $cfg['notify_check'] ? 1 : 0;
}
foreach (['notify_basic', 'notify_sound', 'notify_desktop'] as $key) {
if (isset($cfg[$key])) {
$formKey = 'ident_switch.form.notify.' . substr($key, 7);
$record[$formKey] = $cfg[$key] === null ? '' : ($cfg[$key] ? '1' : '0');
}
}
return (bool)($cfg['readonly'] ?? false);
}