about summary refs log tree commit diff
path: root/src/view/com/notifications/Feed.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-28 14:19:49 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-28 14:19:49 -0600
commit9051aecdcb8cde459c2ce9f0bc3006250c118f6f (patch)
treebae6d18a596a0fc2494b3f9410a844d241a1593a /src/view/com/notifications/Feed.tsx
parent1aa1f7704957fe0725832ff6580d8f8eef14f489 (diff)
downloadvoidsky-9051aecdcb8cde459c2ce9f0bc3006250c118f6f.tar.zst
Use a persistent notifications model to improve load times of the notifications view
Diffstat (limited to 'src/view/com/notifications/Feed.tsx')
-rw-r--r--src/view/com/notifications/Feed.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/view/com/notifications/Feed.tsx b/src/view/com/notifications/Feed.tsx
index 90d16604d..78dcd2fa8 100644
--- a/src/view/com/notifications/Feed.tsx
+++ b/src/view/com/notifications/Feed.tsx
@@ -32,7 +32,7 @@ export const Feed = observer(function Feed({
   }
   return (
     <View style={{flex: 1}}>
-      {view.isLoading && !view.isRefreshing && !view.hasContent && (
+      {view.isLoading && !view.isRefreshing && (
         <NotificationFeedLoadingPlaceholder />
       )}
       {view.hasError && (
@@ -43,7 +43,7 @@ export const Feed = observer(function Feed({
           onPressTryAgain={onPressTryAgain}
         />
       )}
-      {view.hasContent && (
+      {view.hasLoaded && (
         <FlatList
           data={view.notifications}
           keyExtractor={item => item._reactKey}
@@ -53,7 +53,7 @@ export const Feed = observer(function Feed({
           onEndReached={onEndReached}
         />
       )}
-      {view.isEmpty && (
+      {view.hasLoaded && view.isEmpty && (
         <EmptyState icon="bell" message="No notifications yet!" />
       )}
     </View>