From 3f76278173f5f9f0040cc88b15a92d8e45d19951 Mon Sep 17 00:00:00 2001 From: userquin Date: Wed, 10 May 2023 13:13:57 +0200 Subject: [PATCH] fix(ui): handle empty spoiler text --- components/status/StatusContent.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/status/StatusContent.vue b/components/status/StatusContent.vue index 1dbc5da3..7eb94c0f 100644 --- a/components/status/StatusContent.vue +++ b/components/status/StatusContent.vue @@ -21,7 +21,8 @@ const isFiltered = $computed(() => status.account.id !== currentUser.value?.acco // check spoiler text or media attachment // needed to handle accounts that mark all their posts as sensitive -const hasSpoilerOrSensitiveMedia = $computed(() => !!status.spoilerText || (status.sensitive && !!status.mediaAttachments.length)) +const spoilerTextPresent = $computed(() => !!status.spoilerText && status.spoilerText.trim().length === 0) +const hasSpoilerOrSensitiveMedia = $computed(() => spoilerTextPresent || (status.sensitive && !!status.mediaAttachments.length)) const isSensitiveNonSpoiler = computed(() => status.sensitive && !status.spoilerText && !!status.mediaAttachments.length) const hideAllMedia = computed( () => { @@ -40,7 +41,7 @@ const hideAllMedia = computed( > -