refactor: 名前変更 initMuteInfo initWordMuteInfo
This commit is contained in:
parent
cc1fdece65
commit
ca30df4b90
|
@ -24,7 +24,7 @@ import { emojiPicker } from '@/scripts/emoji-picker.js';
|
||||||
import { mainRouter } from '@/router/main.js';
|
import { mainRouter } from '@/router/main.js';
|
||||||
import { type Keymap, makeHotkey } from '@/scripts/hotkey.js';
|
import { type Keymap, makeHotkey } from '@/scripts/hotkey.js';
|
||||||
import { addCustomEmoji, removeCustomEmojis, updateCustomEmojis } from '@/custom-emojis.js';
|
import { addCustomEmoji, removeCustomEmojis, updateCustomEmojis } from '@/custom-emojis.js';
|
||||||
import { initMuteInfo } from '@/scripts/check-word-mute.js';
|
import { initWordMuteInfo } from '@/scripts/check-word-mute.js';
|
||||||
|
|
||||||
export async function mainBoot() {
|
export async function mainBoot() {
|
||||||
const { isClientUpdated } = await common(() => {
|
const { isClientUpdated } = await common(() => {
|
||||||
|
@ -344,14 +344,14 @@ export async function mainBoot() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
initMuteInfo();
|
initWordMuteInfo();
|
||||||
|
|
||||||
const main = markRaw(stream.useChannel('main', null, 'System'));
|
const main = markRaw(stream.useChannel('main', null, 'System'));
|
||||||
|
|
||||||
// 自分の情報が更新されたとき
|
// 自分の情報が更新されたとき
|
||||||
main.on('meUpdated', i => {
|
main.on('meUpdated', i => {
|
||||||
updateAccountPartial(i);
|
updateAccountPartial(i);
|
||||||
initMuteInfo();
|
initWordMuteInfo();
|
||||||
});
|
});
|
||||||
|
|
||||||
main.on('readAllNotifications', () => {
|
main.on('readAllNotifications', () => {
|
||||||
|
|
|
@ -67,7 +67,7 @@ function getWordMuteInfo(): GlobalMisskeyWordMute | undefined {
|
||||||
return globalThis._misskeyWordMute as unknown as GlobalMisskeyWordMute;
|
return globalThis._misskeyWordMute as unknown as GlobalMisskeyWordMute;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function initMuteInfo(): void {
|
export function initWordMuteInfo(): void {
|
||||||
const mutedWords = $i?.mutedWords ?? [];
|
const mutedWords = $i?.mutedWords ?? [];
|
||||||
const hardMutedWords = $i?.hardMutedWords ?? [];
|
const hardMutedWords = $i?.hardMutedWords ?? [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue