Minor fix to color setting

This commit is contained in:
ward
2025-06-23 12:26:38 +12:00
parent 0e1a2f30f3
commit e04ea086dc
+13 -13
View File
@@ -173,6 +173,19 @@
onMount(async () => {
ui();
let themeHex = get(themeColorStore);
if (themeHex) {
await ui('theme', themeHex);
} else if (Capacitor.getPlatform() === 'android') {
if (!themeHex) {
try {
const colorPalette = await colorTheme.getColorPalette();
themeHex = convertToHexColorCode(colorPalette.primary);
await ui('theme', themeHex);
} catch {}
}
}
$isAndroidTvStore = (await androidTv.isAndroidTv()).value;
if ($isAndroidTvStore) {
@@ -192,19 +205,6 @@
// So user preferences overwrite instance preferences.
bookmarkletLoadFromUrl();
let themeHex = get(themeColorStore);
if (themeHex) {
await ui('theme', themeHex);
} else if (Capacitor.getPlatform() === 'android') {
if (!themeHex) {
try {
const colorPalette = await colorTheme.getColorPalette();
themeHex = convertToHexColorCode(colorPalette.primary);
await ui('theme', themeHex);
} catch {}
}
}
await setStatusBarColor();
setTheme();