diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-07-31 21:12:07 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-07-31 21:12:07 +0900 |
| commit | 18daf43f705bde35c7f9a3a584ec14650612d7c1 (patch) | |
| tree | bdd6da9e2094245cc3a2ead02cda897fdc7136bf /packages/frontend/src/theme.ts | |
| parent | enhance(backend): 古いバージョンで作成され現在使われなく... (diff) | |
| download | misskey-18daf43f705bde35c7f9a3a584ec14650612d7c1.tar.gz misskey-18daf43f705bde35c7f9a3a584ec14650612d7c1.tar.bz2 misskey-18daf43f705bde35c7f9a3a584ec14650612d7c1.zip | |
clean up
ワイルドカードセレクタはexpensive
Diffstat (limited to 'packages/frontend/src/theme.ts')
| -rw-r--r-- | packages/frontend/src/theme.ts | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/packages/frontend/src/theme.ts b/packages/frontend/src/theme.ts index a2658df374..036b86cff8 100644 --- a/packages/frontend/src/theme.ts +++ b/packages/frontend/src/theme.ts @@ -140,7 +140,7 @@ export function applyTheme(theme: Theme, persist = true) { // リアクティビティ解除 currentTheme = deepClone(theme); - if (window.document.startViewTransition != null && prefer.s.animation) { + if (window.document.startViewTransition != null) { window.document.documentElement.classList.add('_themeChanging_'); window.document.startViewTransition(async () => { applyThemeInternal(theme, persist); @@ -151,15 +151,9 @@ export function applyTheme(theme: Theme, persist = true) { globalEvents.emit('themeChanged'); }); } else { - // TODO: ViewTransition API が主要ブラウザで対応したら消す - window.document.documentElement.classList.add('_themeChangingFallback_'); - timeout = window.setTimeout(() => { - window.document.documentElement.classList.remove('_themeChangingFallback_'); - // 色計算など再度行えるようにクライアント全体に通知 - globalEvents.emit('themeChanged'); - }, 500); - applyThemeInternal(theme, persist); + // 色計算など再度行えるようにクライアント全体に通知 + globalEvents.emit('themeChanged'); } } |