このコミットが含まれているのは:
+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
|
||||
|
||||
新しい課題から参照
ユーザをブロックする