Update load latest to show when there's new activity with an indicator

This commit is contained in:
Paul Frazee 2023-05-25 01:30:48 -05:00
parent 6f02548bca
commit e89103915d
5 changed files with 59 additions and 9 deletions

View file

@ -246,6 +246,7 @@ const FeedPage = observer(
feed.refresh()
}, [feed, scrollToTop])
const hasNew = feed.hasNewLatest && !feed.isRefreshing
return (
<View testID={testID} style={s.h100pct}>
<Feed
@ -260,8 +261,12 @@ const FeedPage = observer(
renderEmptyState={renderEmptyState}
headerOffset={HEADER_OFFSET}
/>
{isScrolledDown && (
<LoadLatestBtn onPress={onPressLoadLatest} label="Load new posts" />
{(isScrolledDown || hasNew) && (
<LoadLatestBtn
onPress={onPressLoadLatest}
label="Load new posts"
showIndicator={hasNew}
/>
)}
<FAB
testID="composeFAB"