diff options
| author | Sugar <sugar@sylveon.social> | 2024-06-11 19:57:31 +0200 |
|---|---|---|
| committer | Sugar <sugar@sylveon.social> | 2024-06-11 19:57:31 +0200 |
| commit | c149734fbadf2c8c258722b3cff12ec4fe91f8df (patch) | |
| tree | 8d1b369aae1626478495d64319be63344fc25989 /packages/frontend/src/components/MkNote.vue | |
| parent | correct collapsed in reply to line alignment with small screen sizes (diff) | |
| download | sharkey-c149734fbadf2c8c258722b3cff12ec4fe91f8df.tar.gz sharkey-c149734fbadf2c8c258722b3cff12ec4fe91f8df.tar.bz2 sharkey-c149734fbadf2c8c258722b3cff12ec4fe91f8df.zip | |
avoid renoteCollapsed dependency in inReplyToCollapsed
Diffstat (limited to 'packages/frontend/src/components/MkNote.vue')
| -rw-r--r-- | packages/frontend/src/components/MkNote.vue | 11 |
1 files changed, 5 insertions, 6 deletions
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); |