about summary refs log tree commit diff
path: root/src/view/screens/Notifications.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-05-25 01:30:48 -0500
committerPaul Frazee <pfrazee@gmail.com>2023-05-25 01:30:48 -0500
commite89103915db48fc4306b553877be1ffa8ef94e91 (patch)
treea9a0b15d3e25d4d0302ff3cf961436ce91bdd5a8 /src/view/screens/Notifications.tsx
parent6f02548bca0ea918d9caec3e71068032ff119a75 (diff)
downloadvoidsky-e89103915db48fc4306b553877be1ffa8ef94e91.tar.zst
Update load latest to show when there's new activity with an indicator
Diffstat (limited to 'src/view/screens/Notifications.tsx')
-rw-r--r--src/view/screens/Notifications.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/view/screens/Notifications.tsx b/src/view/screens/Notifications.tsx
index 02a4618c3..64dcb3a1a 100644
--- a/src/view/screens/Notifications.tsx
+++ b/src/view/screens/Notifications.tsx
@@ -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>