Patch 1.5.3, Fixes theme sync issue on first startup
Addresses a bug where the email viewer's dark mode setting was not correctly synchronized with the selected theme on the first application launch. This ensures a consistent user experience regarding light/dark mode across the application and email viewer.
This commit is contained in:
@@ -211,6 +211,16 @@
|
||||
})();
|
||||
});
|
||||
|
||||
// Sync theme with email viewer dark mode
|
||||
let previousTheme = $state<string | undefined>(undefined);
|
||||
$effect(() => {
|
||||
if (!browser) return;
|
||||
if (previousTheme !== undefined && form.theme !== previousTheme) {
|
||||
form.useDarkEmailViewer = form.theme === "dark";
|
||||
}
|
||||
previousTheme = form.theme;
|
||||
});
|
||||
|
||||
async function exportSettings() {
|
||||
try {
|
||||
const settingsJSON = JSON.stringify(form, null, 2);
|
||||
|
||||
Reference in New Issue
Block a user