mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-26 20:31:05 +03:00
Further compact-ify threads/conversations with spoilers
This commit is contained in:
parent
f9217ac16f
commit
65e22ea819
1 changed files with 5 additions and 1 deletions
|
@ -383,6 +383,10 @@ function Timeline({
|
||||||
? `/${instance}/s/${statusID}`
|
? `/${instance}/s/${statusID}`
|
||||||
: `/s/${statusID}`;
|
: `/s/${statusID}`;
|
||||||
const isMiddle = i > 0 && i < items.length - 1;
|
const isMiddle = i > 0 && i < items.length - 1;
|
||||||
|
const isSpoiler = item.sensitive && !!item.spoilerText;
|
||||||
|
const showCompact =
|
||||||
|
(isSpoiler && i > 0) ||
|
||||||
|
(manyItems && isMiddle && type === 'thread');
|
||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
key={`timeline-${statusID}`}
|
key={`timeline-${statusID}`}
|
||||||
|
@ -395,7 +399,7 @@ function Timeline({
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<Link class="status-link timeline-item" to={url}>
|
<Link class="status-link timeline-item" to={url}>
|
||||||
{manyItems && isMiddle && type === 'thread' ? (
|
{showCompact ? (
|
||||||
<TimelineStatusCompact
|
<TimelineStatusCompact
|
||||||
status={item}
|
status={item}
|
||||||
instance={instance}
|
instance={instance}
|
||||||
|
|
Loading…
Add table
Reference in a new issue