From 49142df177cfb337850513d5d5d4602386d65769 Mon Sep 17 00:00:00 2001 From: Freeplay Date: Wed, 21 Jun 2023 12:51:36 -0400 Subject: [PATCH] Fix show more button being shown when more than 4 images inside CW --- .../src/components/MkSubNoteContent.vue | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/client/src/components/MkSubNoteContent.vue b/packages/client/src/components/MkSubNoteContent.vue index ea1142e13e..ab9c0a366a 100644 --- a/packages/client/src/components/MkSubNoteContent.vue +++ b/packages/client/src/components/MkSubNoteContent.vue @@ -209,13 +209,19 @@ const emit = defineEmits<{ const cwButton = ref(); const showMoreButton = ref(); -const isLong = - !props.detailedView && - ((props.note.cw == null && - props.note.text != null && - (props.note.text.split("\n").length > 10 || - props.note.text.length > 800)) || - props.note.files.length > 4); + +const isLong = !props.detailedView && props.note.cw == null && + ( + ( + props.note.text != null && + ( + props.note.text.split("\n").length > 10 || + props.note.text.length > 800 + ) + ) || + props.note.files.length > 4 + ) +; const collapsed = $ref(props.note.cw == null && isLong);