このコミットが含まれているのは:
2026-07-05 20:18:16 +09:00
コミット a0c1b8ba31
5個のファイルの変更578行の追加339行の削除
+12 -27
ファイルの表示
@@ -16,12 +16,9 @@ import { applyClientAppearance,
fetchUserThemeSlots,
fetchUserSettings,
getClientThemeMode,
getClientActiveThemeSlot,
hasStoredClientThemeSelection,
normaliseThemeSlotSelectionAgainstSlots,
normaliseUserThemeSlots,
setCachedUserThemeSlots,
setClientActiveThemeSlot,
seedClientThemeMode } from '@/lib/settings'
import { useClientBehaviourSettings } from '@/lib/useClientBehaviourSettings'
@@ -182,30 +179,18 @@ const App: FC = () => {
return
void (async () => {
try
{
const [settings, themeSlots] = await Promise.all ([
fetchUserSettings (),
fetchUserThemeSlots (),
])
const storedThemeSlots = normaliseUserThemeSlots (themeSlots)
const initialSelection = (
hasStoredClientThemeSelection ()
? getClientActiveThemeSlot ()
: (settings.theme === 'system'
? 'system'
: `builtin:${ settings.theme }`)
)
const nextSelection = normaliseThemeSlotSelectionAgainstSlots (
initialSelection,
storedThemeSlots,
)
setCachedUserThemeSlots (storedThemeSlots)
seedClientThemeMode (settings.theme)
if (nextSelection !== initialSelection)
setClientActiveThemeSlot (nextSelection)
applyClientAppearance ()
}
try
{
const [settings, themeSlots] = await Promise.all ([
fetchUserSettings (),
fetchUserThemeSlots (),
])
const storedThemeSlots = normaliseUserThemeSlots (themeSlots)
setCachedUserThemeSlots (storedThemeSlots)
if (!(hasStoredClientThemeSelection ()))
seedClientThemeMode (settings.theme)
applyClientAppearance ()
}
catch
{
return