cleanup, simplify, and merge duplicate word mute implementations

This commit is contained in:
Hazelnoot 2025-05-13 22:58:24 -04:00
parent b52db71e18
commit 8348a36f24
6 changed files with 44 additions and 72 deletions

View file

@ -31,13 +31,12 @@ import { i18n } from '@/i18n.js';
import { prefer } from '@/preferences.js';
const props = defineProps<{
muted: false | 'sensitiveMute' | (string | string[])[];
muted: false | 'sensitiveMute' | string[];
note: Misskey.entities.Note;
}>();
const mutedWords = computed(() => Array.isArray(props.muted)
? props.muted.map(words => Array.isArray(words) ? words.join() : words).join(' ')
? props.muted.join(', ')
: props.muted);
</script>