interface: display last item of thread properly

This commit is contained in:
Logan Allen 2021-05-18 12:21:47 -05:00
parent 8201a3c68b
commit e2d9a32a73

View File

@ -64,7 +64,9 @@ class PostFlatFeed extends React.Component<PostFeedProps, PostFeedState> {
}
const first = flatGraph.peekLargest()?.[0];
const last = flatGraph.peekSmallest()?.[0];
const post = node?.post;
const isLast = last ? indexEqual(index, last) : false;
if (indexEqual(index, (first ?? [bigInt.zero]))) {
if (isThread) {
@ -88,7 +90,7 @@ class PostFlatFeed extends React.Component<PostFeedProps, PostFeedState> {
isRelativeTime={true}
vip={vip}
group={group}
isThread={isThread}
isThread={isThread && !isLast}
/>
</Col>
);
@ -148,7 +150,7 @@ class PostFlatFeed extends React.Component<PostFeedProps, PostFeedState> {
isRelativeTime={true}
vip={vip}
group={group}
isThread={isThread}
isThread={isThread && !isLast}
/>
</Box>
);