このコミットが含まれているのは:
2026-07-05 18:21:39 +09:00
コミット 1b6cac43c2
14個のファイルの変更1540行の追加397行の削除
+26 -1
ファイルの表示
@@ -13,8 +13,15 @@ import DialogueProvider from '@/components/dialogues/DialogueProvider'
import { Toaster } from '@/components/ui/toaster'
import { apiPost, isApiError } from '@/lib/api'
import { applyClientAppearance,
fetchUserThemeSlots,
fetchUserSettings,
getClientThemeMode,
getClientActiveThemeSlot,
hasStoredClientThemeSelection,
normaliseThemeSlotSelectionAgainstSlots,
normaliseUserThemeSlots,
setCachedUserThemeSlots,
setClientActiveThemeSlot,
seedClientThemeMode } from '@/lib/settings'
import { useClientBehaviourSettings } from '@/lib/useClientBehaviourSettings'
@@ -177,8 +184,26 @@ const App: FC = () => {
void (async () => {
try
{
const settings = await fetchUserSettings ()
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 ()
}
catch