From a8cd8ed99ecd8b276ac2a08c03fc053419ca55ea Mon Sep 17 00:00:00 2001
From: kabo2468 <28654659+kabo2468@users.noreply.github.com>
Date: Fri, 21 Jul 2023 18:58:57 +0900
Subject: enhance: 自動でたたまれる機能が返信先や引用RNにも適用されるように
 (#10989)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* 返信、引用RNでMFMがあったら自動で隠すように

* Update CHANGELOG.md

* Update MkSubNoteContent.vue

* refactor: avoid `Boolean`

* docs: update CHANGELOG.md

---------

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
---
 packages/frontend/src/components/MkSubNoteContent.vue | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

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

diff --git a/packages/frontend/src/components/MkSubNoteContent.vue b/packages/frontend/src/components/MkSubNoteContent.vue
index c76ce7315d..3a032a1167 100644
--- a/packages/frontend/src/components/MkSubNoteContent.vue
+++ b/packages/frontend/src/components/MkSubNoteContent.vue
@@ -31,16 +31,13 @@ import MkMediaList from '@/components/MkMediaList.vue';
 import MkPoll from '@/components/MkPoll.vue';
 import { i18n } from '@/i18n';
 import { $i } from '@/account';
+import { shouldCollapsed } from '@/scripts/collapsed';
 
 const props = defineProps<{
 	note: misskey.entities.Note;
 }>();
 
-const isLong =
-	props.note.cw == null && props.note.text != null && (
-		(props.note.text.split('\n').length > 9) ||
-		(props.note.text.length > 500)
-	);
+const isLong = shouldCollapsed(props.note);
 
 const collapsed = $ref(isLong);
 </script>
-- 
cgit v1.2.3-freya

