summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2024-11-03 08:23:52 +0900
committerGitHub <noreply@github.com>2024-11-03 08:23:52 +0900
commitd57b8bf2e211cd7e4d5f03f19387a27bdb9cbde9 (patch)
tree2bd0e9a2284d401364a52182f2a41a8cb7111c62 /packages/frontend/src/components
parentrefactor (diff)
downloadsharkey-d57b8bf2e211cd7e4d5f03f19387a27bdb9cbde9.tar.gz
sharkey-d57b8bf2e211cd7e4d5f03f19387a27bdb9cbde9.tar.bz2
sharkey-d57b8bf2e211cd7e4d5f03f19387a27bdb9cbde9.zip
fix(frontend): withSensitiveフィルタ周りの挙動修正 (#14884)
* fix(frontend): withSensitiveフィルタ周りの挙動修正 * Update MkNote.vue
Diffstat (limited to 'packages/frontend/src/components')
-rw-r--r--packages/frontend/src/components/MkNote.vue15
-rw-r--r--packages/frontend/src/components/MkTimeline.vue1
2 files changed, 10 insertions, 6 deletions
diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue
index 3de69d6d09..cf0d0787b1 100644
--- a/packages/frontend/src/components/MkNote.vue
+++ b/packages/frontend/src/components/MkNote.vue
@@ -292,15 +292,18 @@ function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string
function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string | string[]> | undefined | null, checkOnly: false): boolean | 'sensitiveMute';
*/
function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array<string | string[]> | undefined | null, checkOnly = false): boolean | 'sensitiveMute' {
- if (mutedWords == null) return false;
-
- if (checkWordMute(noteToCheck, $i, mutedWords)) return true;
- if (noteToCheck.reply && checkWordMute(noteToCheck.reply, $i, mutedWords)) return true;
- if (noteToCheck.renote && checkWordMute(noteToCheck.renote, $i, mutedWords)) return true;
+ if (mutedWords != null) {
+ if (checkWordMute(noteToCheck, $i, mutedWords)) return true;
+ if (noteToCheck.reply && checkWordMute(noteToCheck.reply, $i, mutedWords)) return true;
+ if (noteToCheck.renote && checkWordMute(noteToCheck.renote, $i, mutedWords)) return true;
+ }
if (checkOnly) return false;
- if (inTimeline && !tl_withSensitive.value && noteToCheck.files?.some((v) => v.isSensitive)) return 'sensitiveMute';
+ if (inTimeline && tl_withSensitive.value === false && noteToCheck.files?.some((v) => v.isSensitive)) {
+ return 'sensitiveMute';
+ }
+
return false;
}
diff --git a/packages/frontend/src/components/MkTimeline.vue b/packages/frontend/src/components/MkTimeline.vue
index 226faac291..fb8eb4ae37 100644
--- a/packages/frontend/src/components/MkTimeline.vue
+++ b/packages/frontend/src/components/MkTimeline.vue
@@ -43,6 +43,7 @@ const props = withDefaults(defineProps<{
}>(), {
withRenotes: true,
withReplies: false,
+ withSensitive: true,
onlyFiles: false,
});