diff --git a/src/pages/catchup.jsx b/src/pages/catchup.jsx index 433eed32..30000bfd 100644 --- a/src/pages/catchup.jsx +++ b/src/pages/catchup.jsx @@ -1677,63 +1677,70 @@ function PostPeek({ post, filterInfo }) { } = post; const isThread = (inReplyToId && inReplyToAccountId === account.id) || !!_thread; - const showMedia = !spoilerText && !sensitive; + + const readingExpandSpoilers = useMemo(() => { + const prefs = store.account.get('preferences') || {}; + return !!prefs['reading:expand:spoilers']; + }, []); + // const readingExpandSpoilers = true; + const showMedia = readingExpandSpoilers || (!spoilerText && !sensitive); const postText = content ? statusPeek(post) : ''; + const showPostContent = !spoilerText || readingExpandSpoilers; + return (
+ {isThread && !showPostContent && ( + <> + Thread{' '} + + )} {!!filterInfo ? ( - <> - {isThread && ( - <> - Thread{' '} - - )} - - Filtered{filterInfo?.titlesStr ? `: ${filterInfo.titlesStr}` : ''} - - - ) : !!spoilerText ? ( - <> - {isThread && ( - <> - Thread{' '} - - )} - - {spoilerText} - - + + Filtered{filterInfo?.titlesStr ? `: ${filterInfo.titlesStr}` : ''} + ) : ( -
- {isThread && ( - <> - Thread{' '} - + <> + {!!spoilerText && ( + + {' '} + {spoilerText} + )} - {!!content && ( -
+ {showPostContent && ( +
+ {isThread && ( + <> + Thread{' '} + + )} + {!!content && ( +
+ )} + {!!poll?.options?.length && + poll.options.map((o) => ( +
+ {poll.multiple ? '▪️' : '•'} {o.title} +
+ ))} + {!content && + mediaAttachments?.length === 1 && + mediaAttachments[0].description && ( + <> + ALT{' '} +
{mediaAttachments[0].description}
+ + )} +
)} - {!!poll?.options?.length && - poll.options.map((o) => ( -
- {poll.multiple ? '▪️' : '•'} {o.title} -
- ))} - {!content && - mediaAttachments?.length === 1 && - mediaAttachments[0].description && ( - <> - ALT{' '} -
{mediaAttachments[0].description}
- - )} -
+ )} {!filterInfo && (