mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
adding empty conversation indicator
This commit is contained in:
parent
a44448d8c4
commit
c6d996ab04
@ -88,6 +88,12 @@ export function ConversationBody() {
|
|||||||
<KeyboardAvoidingView behavior="padding" keyboardVerticalOffset={72}
|
<KeyboardAvoidingView behavior="padding" keyboardVerticalOffset={72}
|
||||||
enabled={Platform.OS === 'ios' ? state.keyboard : false}>
|
enabled={Platform.OS === 'ios' ? state.keyboard : false}>
|
||||||
<View style={styles.thread}>
|
<View style={styles.thread}>
|
||||||
|
{ state.topics.length === 0 && (
|
||||||
|
<View style={styles.empty}>
|
||||||
|
<Text style={styles.emptyText}>No Messages</Text>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
{ state.topics.length !== 0 && (
|
||||||
<FlatList style={styles.conversation}
|
<FlatList style={styles.conversation}
|
||||||
contentContainerStyle={styles.topics}
|
contentContainerStyle={styles.topics}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
@ -102,6 +108,7 @@ export function ConversationBody() {
|
|||||||
report={actions.reportTopic} />}
|
report={actions.reportTopic} />}
|
||||||
keyExtractor={item => item.topicId}
|
keyExtractor={item => item.topicId}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
{ !state.init && (
|
{ !state.init && (
|
||||||
<View style={styles.loading}>
|
<View style={styles.loading}>
|
||||||
<ActivityIndicator size="large" color={Colors.primary} />
|
<ActivityIndicator size="large" color={Colors.primary} />
|
||||||
|
@ -65,6 +65,16 @@ export const styles = StyleSheet.create({
|
|||||||
minHeight: 0,
|
minHeight: 0,
|
||||||
paddingTop: 8,
|
paddingTop: 8,
|
||||||
},
|
},
|
||||||
|
empty: {
|
||||||
|
flexGrow: 1,
|
||||||
|
flexShrink: 1,
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
},
|
||||||
|
emptyText: {
|
||||||
|
fontSize: 16,
|
||||||
|
color: Colors.grey,
|
||||||
|
},
|
||||||
close: {
|
close: {
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
justifyContent: 'flex-end',
|
justifyContent: 'flex-end',
|
||||||
|
Loading…
Reference in New Issue
Block a user