Use a persistent notifications model to improve load times of the notifications view
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user