diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-03-20 15:42:02 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-03-20 15:42:02 +0900 |
| commit | 9bb6dc52b855dcebd0c0493240d6282ba21810c2 (patch) | |
| tree | dc9bf37dc92ef48fb5ca47d4439b9f70bf0f2f38 /src/client/theme-store.ts | |
| parent | クライアントサイドで実装したいため一旦 injectPromo およ... (diff) | |
| download | misskey-9bb6dc52b855dcebd0c0493240d6282ba21810c2.tar.gz misskey-9bb6dc52b855dcebd0c0493240d6282ba21810c2.tar.bz2 misskey-9bb6dc52b855dcebd0c0493240d6282ba21810c2.zip | |
clean up など
Diffstat (limited to 'src/client/theme-store.ts')
| -rw-r--r-- | src/client/theme-store.ts | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/client/theme-store.ts b/src/client/theme-store.ts index 5e440efbf9..8e21af70fc 100644 --- a/src/client/theme-store.ts +++ b/src/client/theme-store.ts @@ -33,30 +33,3 @@ export async function removeTheme(theme: Theme): Promise<void> { await api('i/registry/set', { scope: ['client'], key: 'themes', value: themes }); localStorage.setItem(lsCacheKey, JSON.stringify(themes)); } - -// TODO: そのうち消す -if (ColdDeviceStorage.get('themes').length > 0) { - const lsThemes = ColdDeviceStorage.get('themes'); - let registryThemes; - try { - registryThemes = await api('i/registry/get', { scope: ['client'], key: 'themes' }); - } catch (e) { - if (e.code === 'NO_SUCH_KEY') { - registryThemes = []; - } else { - throw e; - } - } - const themes = [] as Theme[]; - for (const theme of lsThemes) { - if (themes.some(x => x.id === theme.id)) continue; - themes.push(theme); - } - for (const theme of registryThemes) { - if (themes.some(x => x.id === theme.id)) continue; - themes.push(theme); - } - await api('i/registry/set', { scope: ['client'], key: 'themes', value: themes }); - localStorage.setItem(lsCacheKey, JSON.stringify(themes)); - ColdDeviceStorage.set('themes', []); -} |