From 751322d0ea0fa66f79aa9d477702ff80a815af02 Mon Sep 17 00:00:00 2001 From: Abdelrahman Medhat Saber <136710727+bedosaber77@users.noreply.github.com> Date: Tue, 16 Dec 2025 12:39:54 +0200 Subject: [PATCH] Revert "feat:add show more on tweets content" This reverts commit ca98a8683745d5507afc2fe304bd7f7223854be6, reversing changes made to 852185d1978cc8cf2abc95258b167f3faa27c7eb. --- .../Tweet/subComponents/Content/Content.vue | 37 ++----------------- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/app/modules/tweets/components/Tweet/subComponents/Content/Content.vue b/app/modules/tweets/components/Tweet/subComponents/Content/Content.vue index d41b37ba..15d14c3b 100644 --- a/app/modules/tweets/components/Tweet/subComponents/Content/Content.vue +++ b/app/modules/tweets/components/Tweet/subComponents/Content/Content.vue @@ -4,17 +4,10 @@

- - +

@@ -39,7 +32,7 @@ import type { Content } from '~/modules/tweets/types' import TweetMedia from '../TweetMedia/TweetMedia.vue' import QuotedTweet from '../QuotedTweet/QuotedTweet.vue' -import { ref, computed, onMounted, onBeforeUnmount } from 'vue' +import { ref, onMounted, onBeforeUnmount } from 'vue' import { useRouter } from 'vue-router' import { parseLinks } from '~/lib/utils' @@ -49,28 +42,6 @@ const props = defineProps<{ const root = ref(null) const router = useRouter() -const isExpanded = ref(false) -const MAX_LENGTH = 200 - -const shouldShowMore = computed(() => { - return props.content.text.length > MAX_LENGTH -}) - -const displayText = computed(() => { - const text = props.content.text - const parsedText = parseLinks(text, false, false, props.content.mentions) - - if (!shouldShowMore.value || isExpanded.value) { - return parsedText - } - - const truncatedText = text.substring(0, MAX_LENGTH) - return parseLinks(truncatedText, false, false, props.content.mentions) -}) - -const toggleExpanded = () => { - isExpanded.value = !isExpanded.value -} function onRootClick(e: Event) { const target = e.target as HTMLElement | null