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

@ -88,6 +88,9 @@ export const NotificationsScreen = withAuthRequired(
),
)
const hasNew =
store.me.notifications.hasNewLatest &&
!store.me.notifications.isRefreshing
return (
<View testID="notificationsScreen" style={s.hContentRegion}>
<ViewHeader title="Notifications" canGoBack={false} />
@ -98,10 +101,11 @@ export const NotificationsScreen = withAuthRequired(
onScroll={onMainScroll}
scrollElRef={scrollElRef}
/>
{isScrolledDown && (
{(isScrolledDown || hasNew) && (
<LoadLatestBtn
onPress={onPressLoadLatest}
label="Load new notifications"
showIndicator={hasNew}
/>
)}
</View>