diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 3ca7455f0d..794a091f30 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -321,20 +321,27 @@ const pleaseLoginContext = computed(() => ({ url: `https://${host}/notes/${appearNote.id}`, })); -/* Overload FunctionにLintが対応していないのでコメントアウト +/* eslint-disable no-redeclare */ +/** checkOnlyでは純粋なワードミュート結果をbooleanで返却する */ function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array | undefined | null, checkOnly: true): boolean; -function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array | undefined | null, checkOnly: false): Array | false | 'sensitiveMute'; -*/ -function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array | undefined | null, checkOnly = false): Array | false | 'sensitiveMute' { +function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array | undefined | null, checkOnly?: false): Array | false | 'sensitiveMute'; + +function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array | undefined | null, checkOnly = false): Array | boolean | 'sensitiveMute' { if (mutedWords != null) { const result = checkWordMute(noteToCheck, $i, mutedWords); - if (Array.isArray(result)) return result; + if (Array.isArray(result)) { + return checkOnly ? (result.length > 0) : result; + } const replyResult = noteToCheck.reply && checkWordMute(noteToCheck.reply, $i, mutedWords); - if (Array.isArray(replyResult)) return replyResult; + if (Array.isArray(replyResult)) { + return checkOnly ? (replyResult.length > 0) : replyResult; + } const renoteResult = noteToCheck.renote && checkWordMute(noteToCheck.renote, $i, mutedWords); - if (Array.isArray(renoteResult)) return renoteResult; + if (Array.isArray(renoteResult)) { + return checkOnly ? (renoteResult.length > 0) : renoteResult; + } } if (checkOnly) return false; @@ -345,6 +352,7 @@ function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array { @@ -417,7 +425,7 @@ if (!props.mock) { const users = renotes.map(x => x.user); - if (users.length < 1) return; + if (users.length < 1 || renoteButton.value == null) return; const { dispose } = os.popup(MkUsersTooltip, { showing, diff --git a/packages/frontend/src/components/MkStreamingNotesTimeline.vue b/packages/frontend/src/components/MkStreamingNotesTimeline.vue index db9621e378..7e72840b7b 100644 --- a/packages/frontend/src/components/MkStreamingNotesTimeline.vue +++ b/packages/frontend/src/components/MkStreamingNotesTimeline.vue @@ -428,7 +428,7 @@ defineExpose({ background: var(--MI_THEME-panel); } -.note { +.note:not(:empty) { border-bottom: solid 0.5px var(--MI_THEME-divider); } diff --git a/packages/frontend/src/utility/get-note-menu.ts b/packages/frontend/src/utility/get-note-menu.ts index 5b99be5fdb..ea93444f08 100644 --- a/packages/frontend/src/utility/get-note-menu.ts +++ b/packages/frontend/src/utility/get-note-menu.ts @@ -542,7 +542,7 @@ function smallerVisibility(a: Visibility, b: Visibility): Visibility { export function getRenoteMenu(props: { note: Misskey.entities.Note; - renoteButton: ShallowRef; + renoteButton: ShallowRef; mock?: boolean; }) { const appearNote = getAppearNote(props.note);