From c149734fbadf2c8c258722b3cff12ec4fe91f8df Mon Sep 17 00:00:00 2001
From: Sugar <sugar@sylveon.social>
Date: Tue, 11 Jun 2024 19:57:31 +0200
Subject: avoid renoteCollapsed dependency in inReplyToCollapsed

---
 packages/frontend/src/components/MkNote.vue | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

(limited to 'packages/frontend/src/components/MkNote.vue')

diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue
index e6fe8ff9d8..6f50f81eaf 100644
--- a/packages/frontend/src/components/MkNote.vue
+++ b/packages/frontend/src/components/MkNote.vue
@@ -311,13 +311,12 @@ const translation = ref<Misskey.entities.NotesTranslateResponse | null>(null);
 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(
-	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 renoteCollapsedInitialValue = 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(defaultStore.state.collapseNotesRepliedTo && !renoteCollapsed.value);
+const renoteCollapsed = ref(renoteCollapsedInitialValue);
+const inReplyToCollapsed = ref(defaultStore.state.collapseNotesRepliedTo && !renoteCollapsedInitialValue);
 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);
-- 
cgit v1.2.3-freya

