Skip to content

Commit

Permalink
Merge 3af28d9 into a7ae6b9
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-glazier committed Mar 21, 2024
2 parents a7ae6b9 + 3af28d9 commit 690652a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/Messaging/SearchRecipientsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
ViewStyle,
} from 'react-native';
import { GiftedAvatar, User as GiftedUser } from 'react-native-gifted-chat';
import { Button, Divider, List, Searchbar } from 'react-native-paper';
import { Button, Divider, List, Searchbar, Text } from 'react-native-paper';
import { tID } from '../TrackTile/common/testID';
import { useStyles, useUser } from '../../hooks';
import { createStyles, useIcons } from '../BrandConfigProvider';
Expand Down Expand Up @@ -77,6 +77,16 @@ export const SearchRecipientsModal = ({
clearIcon={ClearList}
testID={tID('search-bar')}
/>
{others.length < 1 && (
<View>
<Text style={{ textAlign: 'center' }}>
{t(
'no-recipients-message',
'No available message recipients. \nYou must be added to a messaging group to use this feature. Ask your administrator for more information.',
)}
</Text>
</View>
)}
<ScrollView
scrollEventThrottle={400}
contentContainerStyle={styles.scrollView}
Expand Down
12 changes: 12 additions & 0 deletions src/screens/MessageScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,18 @@ export function MessageScreen<ParamList extends ParamListBase>({
</TouchableOpacity>
</Swipeable>
))}
{!conversations?.length && !isLoading && (
<Swipeable>
<List.Item
titleStyle={styles.listItemText}
title={t('no-direct-messages', 'No message history.')}
style={styles.listItemView}
description={t('no-direct-messages', 'New messages appear here.')}
descriptionStyle={styles.listItemSubtitleText}
/>
<Divider style={styles.listItemDividerView} />
</Swipeable>
)}
{isLoading ? (
<ActivityIndicatorView />
) : (
Expand Down

0 comments on commit 690652a

Please sign in to comment.