From 2edbd4eca4ab72288fc03563b93f254531098d2e Mon Sep 17 00:00:00 2001 From: mattyatea Date: Sat, 21 Oct 2023 11:32:09 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=E3=81=AA=E3=82=93=E3=81=8B=E3=81=8A?= =?UTF-8?q?=E3=81=8B=E3=81=97=E3=81=84=E3=81=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/components/MkNote.vue | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index b2374def60..139749670e 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -276,7 +276,6 @@ function smallerVisibility(a: Visibility | string, b: Visibility | string): Visi } function renote(viaKeyboard = false) { - if (muted && !hideMutedNotes) return; pleaseLogin(); showMovedDialog(); @@ -289,7 +288,7 @@ function renote(viaKeyboard = false) { action: () => { const el = renoteButton.value as HTMLElement | null | undefined; if (el) { - const rect = el?.getBoundingClientRect(); + const rect = el.getBoundingClientRect(); const x = rect.left + (el.offsetWidth / 2); const y = rect.top + (el.offsetHeight / 2); os.popup(MkRippleEffect, {x, y}, {}, 'end'); @@ -320,7 +319,7 @@ function renote(viaKeyboard = false) { action: () => { const el = renoteButton.value as HTMLElement | null | undefined; if (el) { - const rect = el?.getBoundingClientRect(); + const rect = el.getBoundingClientRect(); const x = rect.left + (el.offsetWidth / 2); const y = rect.top + (el.offsetHeight / 2); os.popup(MkRippleEffect, {x, y}, {}, 'end'); @@ -359,7 +358,6 @@ function renote(viaKeyboard = false) { } function reply(viaKeyboard = false): void { - if (muted && !hideMutedNotes) return; pleaseLogin(); os.post({ reply: appearNote, @@ -371,7 +369,6 @@ function reply(viaKeyboard = false): void { } function react(viaKeyboard = false): void { - if (muted && !hideMutedNotes) return; pleaseLogin(); showMovedDialog(); if (appearNote.reactionAcceptance === 'likeOnly') { @@ -381,7 +378,7 @@ function react(viaKeyboard = false): void { }); const el = reactButton.value as HTMLElement | null | undefined; if (el) { - const rect = el?.getBoundingClientRect(); + const rect = el.getBoundingClientRect(); const x = rect.left + (el.offsetWidth / 2); const y = rect.top + (el.offsetHeight / 2); os.popup(MkRippleEffect, {x, y}, {}, 'end'); @@ -403,7 +400,6 @@ function react(viaKeyboard = false): void { } function undoReact(note): void { - if (muted && !hideMutedNotes) return; const oldReaction = note.myReaction; if (!oldReaction) return; os.api('notes/reactions/delete', { @@ -412,7 +408,6 @@ function undoReact(note): void { } function onContextmenu(ev: MouseEvent): void { - if (muted && !hideMutedNotes) return; const isLink = (el: HTMLElement) => { if (el.tagName === 'A') return true; // 再生速度の選択などのために、Audio要素のコンテキストメニューはブラウザデフォルトとする。 @@ -441,7 +436,6 @@ function onContextmenu(ev: MouseEvent): void { } function menu(viaKeyboard = false): void { - if (muted && !hideMutedNotes) return; const {menu, cleanup} = getNoteMenu({ note: note, translating, @@ -456,7 +450,6 @@ function menu(viaKeyboard = false): void { } async function clip() { - if (muted && !hideMutedNotes) return; os.popupMenu(await getNoteClipMenu({ note: note, isDeleted, @@ -465,7 +458,6 @@ async function clip() { } function showRenoteMenu(viaKeyboard = false): void { - if (muted && !hideMutedNotes) return; function getUnrenote(): MenuItem { return { text: i18n.ts.unrenote, @@ -502,22 +494,18 @@ function showRenoteMenu(viaKeyboard = false): void { } function focus() { - if (muted && !hideMutedNotes) return; el.value.focus(); } function blur() { - if (muted && !hideMutedNotes) return; el.value.blur(); } function focusBefore() { - if (muted && !hideMutedNotes) return; focusPrev(el.value); } function focusAfter() { - if (muted && !hideMutedNotes) return; focusNext(el.value); }