show announcement after items in list are loaded successfully

This commit is contained in:
ammarahm-ed
2021-04-11 10:35:21 +05:00
parent 84d2b72fab
commit c922f61e49

View File

@@ -237,9 +237,6 @@ const SimpleList = ({
}; };
return ( return (
<> <>
<Announcement
color={COLORS_NOTE[headerProps.heading?.toLowerCase()] || colors.accent}
/>
{loaded && !loading ? null : ( {loaded && !loading ? null : (
<> <>
<View <View
@@ -250,11 +247,6 @@ const SimpleList = ({
backgroundColor: colors.bg, backgroundColor: colors.bg,
zIndex: 999, zIndex: 999,
}}> }}>
<Announcement
color={
COLORS_NOTE[headerProps.heading?.toLowerCase()] || colors.accent
}
/>
<Header <Header
title={headerProps.heading} title={headerProps.heading}
paragraph={headerProps.paragraph} paragraph={headerProps.paragraph}
@@ -269,6 +261,12 @@ const SimpleList = ({
)} )}
{_loading ? null : ( {_loading ? null : (
<>
<Announcement
color={
COLORS_NOTE[headerProps.heading?.toLowerCase()] || colors.accent
}
/>
<RecyclerListView <RecyclerListView
ref={scrollRef} ref={scrollRef}
layoutProvider={_layoutProvider} layoutProvider={_layoutProvider}
@@ -280,6 +278,7 @@ const SimpleList = ({
scrollViewProps={scrollProps} scrollViewProps={scrollProps}
style={styles} style={styles}
/> />
</>
)} )}
</> </>
); );