Fix load state

This commit is contained in:
Eric Bailey
2024-06-25 19:52:10 -05:00
parent a64f10bb70
commit 5eac3277ac
+6 -4
View File
@@ -83,10 +83,12 @@ export function SavedFeeds({}: Props) {
const isSavedFeedsLoading = const isSavedFeedsLoading =
isSavedFeedsPlaceholder && !savedFeeds?.feeds.length isSavedFeedsPlaceholder && !savedFeeds?.feeds.length
const numPinnedFeedsPlaceholders = savedFeeds ? savedFeeds.counts.pinned : 4 const numPinnedFeedsPlaceholders = savedFeeds
? Math.max(savedFeeds.counts.pinned, 3)
: 3
const numUnpinnedFeedsPlaceholders = savedFeeds const numUnpinnedFeedsPlaceholders = savedFeeds
? savedFeeds.counts.unpinned ? Math.max(savedFeeds.counts.unpinned, 3)
: 4 : 3
useFocusEffect( useFocusEffect(
React.useCallback(() => { React.useCallback(() => {
@@ -104,7 +106,7 @@ export function SavedFeeds({}: Props) {
]}> ]}>
<ViewHeader title={_(msg`Edit My Feeds`)} showOnDesktop showBorder /> <ViewHeader title={_(msg`Edit My Feeds`)} showOnDesktop showBorder />
<ScrollView style={s.flex1} contentContainerStyle={[styles.noBorder]}> <ScrollView style={s.flex1} contentContainerStyle={[styles.noBorder]}>
{noSavedFeedsOfAnyType && ( {!isSavedFeedsLoading && noSavedFeedsOfAnyType && (
<View style={[pal.border, {borderBottomWidth: hairlineWidth}]}> <View style={[pal.border, {borderBottomWidth: hairlineWidth}]}>
<NoSavedFeedsOfAnyType /> <NoSavedFeedsOfAnyType />
</View> </View>