Differentiate between previewMode vs quoted

When previewMode, auto-reveal spoiler
This commit is contained in:
Lim Chee Aun 2023-04-27 08:25:39 +08:00
parent 5bbb268731
commit a196540d66

View file

@ -211,7 +211,7 @@ function Status({
inReplyToAccountId === currentAccount || inReplyToAccountId === currentAccount ||
mentions?.find((mention) => mention.id === currentAccount); mentions?.find((mention) => mention.id === currentAccount);
const showSpoiler = !!snapStates.spoilers[id] || false; const showSpoiler = previewMode || !!snapStates.spoilers[id] || false;
if (reblog) { if (reblog) {
// If has statusID, means useItemID (cached in states) // If has statusID, means useItemID (cached in states)
@ -679,7 +679,7 @@ function Status({
}, },
); );
const showContextMenu = size !== 'l' && !previewMode && !_deleted; const showContextMenu = size !== 'l' && !previewMode && !_deleted && !quoted;
return ( return (
<article <article
@ -788,7 +788,7 @@ function Status({
{size !== 'l' && {size !== 'l' &&
(_deleted ? ( (_deleted ? (
<span class="status-deleted-tag">Deleted</span> <span class="status-deleted-tag">Deleted</span>
) : url && !previewMode ? ( ) : url && !previewMode && !quoted ? (
<Menu <Menu
instanceRef={menuInstanceRef} instanceRef={menuInstanceRef}
portal={{ portal={{
@ -1955,7 +1955,6 @@ const QuoteStatuses = memo(({ id, instance, level = 0 }) => {
instance={q.instance} instance={q.instance}
size="s" size="s"
quoted={level + 1} quoted={level + 1}
previewMode
/> />
</Link> </Link>
); );