From fa176ab5437ee848aa83b45a977b71a207762ec0 Mon Sep 17 00:00:00 2001 From: Hazel K Date: Wed, 2 Oct 2024 00:48:23 -0400 Subject: [PATCH] Revert "expose prop to force-collapse MkNote / SkNote" This reverts commit c5117552ca8919788f3aaa13a91661ede728d674. --- packages/frontend/src/components/MkNote.vue | 8 ++------ packages/frontend/src/components/SkNote.vue | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index a6dff06fd5..e2f0a4e492 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -241,12 +241,8 @@ const props = withDefaults(defineProps<{ pinned?: boolean; mock?: boolean; withHardMute?: boolean; - collapseRenote?: boolean; - collapseReplies?: boolean; }>(), { mock: false, - collapseRenote: undefined, - collapseReplies: undefined, }); provide('mock', props.mock); @@ -318,12 +314,12 @@ const translating = ref(false); const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance); const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i?.id)); const renoteCollapsed = ref( - (props.collapseRenote ?? defaultStore.state.collapseRenotes) && isRenote && ( + defaultStore.state.collapseRenotes && isRenote && ( ($i && ($i.id === note.value.userId || $i.id === appearNote.value.userId)) || // `||` must be `||`! See https://github.com/misskey-dev/misskey/issues/13131 (appearNote.value.myReaction != null) ), ); -const inReplyToCollapsed = ref(props.collapseReplies ?? defaultStore.state.collapseNotesRepliedTo); +const inReplyToCollapsed = ref(defaultStore.state.collapseNotesRepliedTo); const defaultLike = computed(() => defaultStore.state.like ? defaultStore.state.like : null); const animated = computed(() => parsed.value ? checkAnimationFromMfm(parsed.value) : null); const allowAnim = ref(defaultStore.state.advancedMfm && defaultStore.state.animatedMfm ? true : false); diff --git a/packages/frontend/src/components/SkNote.vue b/packages/frontend/src/components/SkNote.vue index 60e593b7b0..b02d902482 100644 --- a/packages/frontend/src/components/SkNote.vue +++ b/packages/frontend/src/components/SkNote.vue @@ -241,12 +241,8 @@ const props = withDefaults(defineProps<{ pinned?: boolean; mock?: boolean; withHardMute?: boolean; - collapseRenote?: boolean; - collapseReplies?: boolean; }>(), { mock: false, - collapseRenote: undefined, - collapseReplies: undefined, }); provide('mock', props.mock); @@ -318,12 +314,12 @@ const translating = ref(false); const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance); const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || (appearNote.value.visibility === 'followers' && appearNote.value.userId === $i?.id)); const renoteCollapsed = ref( - (props.collapseRenote ?? defaultStore.state.collapseRenotes) && isRenote && ( + defaultStore.state.collapseRenotes && isRenote && ( ($i && ($i.id === note.value.userId || $i.id === appearNote.value.userId)) || // `||` must be `||`! See https://github.com/misskey-dev/misskey/issues/13131 (appearNote.value.myReaction != null) ) ); -const inReplyToCollapsed = ref(props.collapseReplies ?? defaultStore.state.collapseNotesRepliedTo); +const inReplyToCollapsed = ref(defaultStore.state.collapseNotesRepliedTo); const defaultLike = computed(() => defaultStore.state.like ? defaultStore.state.like : null); const animated = computed(() => parsed.value ? checkAnimationFromMfm(parsed.value) : null); const allowAnim = ref(defaultStore.state.advancedMfm && defaultStore.state.animatedMfm ? true : false);