File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,17 +6,19 @@ import { useTranslationContext } from '../../contexts/translationContext/Transla
66import { primitives } from '../../theme' ;
77import { Spinner } from '../UIComponents/Spinner' ;
88
9- type LoadingIndicatorWrapperProps = { text : string } ;
9+ type LoadingIndicatorWrapperProps = { text : string | undefined } ;
1010
1111const LoadingIndicatorWrapper = ( { text } : LoadingIndicatorWrapperProps ) => {
1212 const styles = useStyles ( ) ;
1313
1414 return (
1515 < View style = { styles . container } >
1616 < Spinner height = { 20 } width = { 20 } />
17- < Text style = { styles . loadingText } testID = 'loading' >
18- { text }
19- </ Text >
17+ { text ? (
18+ < Text style = { styles . loadingText } testID = 'loading' >
19+ { text }
20+ </ Text >
21+ ) : null }
2022 </ View >
2123 ) ;
2224} ;
@@ -44,7 +46,7 @@ export const LoadingIndicator = (props: LoadingProps) => {
4446 case 'message' :
4547 return < LoadingIndicatorWrapper text = { t ( 'Loading messages...' ) } /> ;
4648 case 'threads' :
47- return < LoadingIndicatorWrapper text = { t ( 'Loading threads...' ) } /> ;
49+ return < LoadingIndicatorWrapper text = { undefined } /> ;
4850 default :
4951 return < LoadingIndicatorWrapper text = { t ( 'Loading...' ) } /> ;
5052 }
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export const DefaultThreadListLoadingIndicator = () => (
4545 ) ) }
4646 </ View >
4747) ;
48- export const DefaultThreadListLoadingNextIndicator = ( ) => < LoadingIndicator /> ;
48+ export const DefaultThreadListLoadingNextIndicator = ( ) => < LoadingIndicator listType = 'threads' /> ;
4949
5050const renderItem = ( props : { item : Thread } ) => < ThreadListItem thread = { props . item } /> ;
5151
You can’t perform that action at this time.
0 commit comments