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