diff --git a/app/components/custom_list/index.js b/app/components/custom_list/index.js index 713f70599..e4ca1ad1a 100644 --- a/app/components/custom_list/index.js +++ b/app/components/custom_list/index.js @@ -165,6 +165,7 @@ export default class CustomList extends PureComponent { loading, onListEndReached, onListEndReachedThreshold, + searching, showNoResults, showSections, theme @@ -179,8 +180,15 @@ export default class CustomList extends PureComponent { noResults = data.length === 0; } - if (loading) { - return ; + let loadingComponent; + if (loading && searching) { + loadingComponent = ( + + + + ); } if (showNoResults && noResults) { @@ -196,20 +204,23 @@ export default class CustomList extends PureComponent { } return ( - + + + {loadingComponent} + ); } } @@ -228,6 +239,12 @@ const getStyleFromTheme = makeStyleSheetFromTheme((theme) => { loadingText: { color: changeOpacity(theme.centerChannelColor, 0.6) }, + searching: { + backgroundColor: theme.centerChannelBg, + height: '100%', + position: 'absolute', + width: '100%' + }, sectionContainer: { backgroundColor: changeOpacity(theme.centerChannelColor, 0.07), paddingLeft: 10,