mirror of
https://github.com/urbit/shrub.git
synced 2024-12-19 16:51:42 +03:00
interface: display last item of thread properly
This commit is contained in:
parent
8201a3c68b
commit
e2d9a32a73
@ -64,7 +64,9 @@ class PostFlatFeed extends React.Component<PostFeedProps, PostFeedState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const first = flatGraph.peekLargest()?.[0];
|
const first = flatGraph.peekLargest()?.[0];
|
||||||
|
const last = flatGraph.peekSmallest()?.[0];
|
||||||
const post = node?.post;
|
const post = node?.post;
|
||||||
|
const isLast = last ? indexEqual(index, last) : false;
|
||||||
|
|
||||||
if (indexEqual(index, (first ?? [bigInt.zero]))) {
|
if (indexEqual(index, (first ?? [bigInt.zero]))) {
|
||||||
if (isThread) {
|
if (isThread) {
|
||||||
@ -88,7 +90,7 @@ class PostFlatFeed extends React.Component<PostFeedProps, PostFeedState> {
|
|||||||
isRelativeTime={true}
|
isRelativeTime={true}
|
||||||
vip={vip}
|
vip={vip}
|
||||||
group={group}
|
group={group}
|
||||||
isThread={isThread}
|
isThread={isThread && !isLast}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
);
|
);
|
||||||
@ -148,7 +150,7 @@ class PostFlatFeed extends React.Component<PostFeedProps, PostFeedState> {
|
|||||||
isRelativeTime={true}
|
isRelativeTime={true}
|
||||||
vip={vip}
|
vip={vip}
|
||||||
group={group}
|
group={group}
|
||||||
isThread={isThread}
|
isThread={isThread && !isLast}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user