29f6ba6310
* chore: add workflow which checks if SPDX ID exists * chore: add missing SPDX ID in some files * chore: change trigger condition * chore: trigger on push * lint
25 lines
779 B
TypeScript
25 lines
779 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
import { unisonReload } from '@/scripts/unison-reload.js';
|
|
import * as os from '@/os.js';
|
|
import { miLocalStorage } from '@/local-storage.js';
|
|
import { fetchCustomEmojis } from '@/custom-emojis.js';
|
|
import { fetchInstance } from '@/instance.js';
|
|
|
|
export async function clearCache() {
|
|
os.waiting();
|
|
miLocalStorage.removeItem('instance');
|
|
miLocalStorage.removeItem('instanceCachedAt');
|
|
miLocalStorage.removeItem('locale');
|
|
miLocalStorage.removeItem('localeVersion');
|
|
miLocalStorage.removeItem('theme');
|
|
miLocalStorage.removeItem('emojis');
|
|
miLocalStorage.removeItem('lastEmojisFetchedAt');
|
|
await fetchInstance(true);
|
|
await fetchCustomEmojis(true);
|
|
unisonReload();
|
|
}
|