Skip to content

Commit

Permalink
Don't apply this patch when not logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
qwreey committed Dec 11, 2023
1 parent 1a22c9e commit 4dc5774
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/frontend/src/components/MkNoteSimple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,24 @@ import MkSubNoteContent from '@/components/MkSubNoteContent.vue';
import MkCwButton from '@/components/MkCwButton.vue';
import { $i } from '@/account.js';
import { checkWordMute } from '@/scripts/check-word-mute.js';
import { deepClone } from '@/scripts/clone.js';
import { userPage } from '@/filters/user.js';
import { deepClone } from '@/scripts/clone.js';
const props = defineProps<{
note: Misskey.entities.Note;
}>();
const note = ref(deepClone(props.note));
const showContent = ref(false);
const muted = ref(checkMute(note.value, $i?.mutedWords));
let note = ref(deepClone(props.note));
const muted = ref(checkWordMute(note, $i, $i?.mutedWords));
function checkMute(note: Misskey.entities.Note, mutedWords: Array<string | string[]> | undefined | null): boolean {
if (mutedWords == null) return false;
if (checkWordMute(note, $i, mutedWords)) return true;
return false;
}
</script>

<style lang="scss" module>
Expand Down

0 comments on commit 4dc5774

Please sign in to comment.