Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
[PAY-1031] Mobile chat list views use full height (#3123)
Browse files Browse the repository at this point in the history
  • Loading branch information
dharit-tan authored Mar 29, 2023
1 parent 41e3f5d commit 81ef3b3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/mobile/src/screens/chat-screen/ChatListScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ const useStyles = makeStyles(({ spacing, palette, typography }) => ({
width: spacing(20),
alignSelf: 'center'
},
listContainer: {
height: '100%'
},
startConversationContainer: {
marginVertical: spacing(8),
marginHorizontal: spacing(4),
Expand Down Expand Up @@ -128,6 +131,7 @@ export const ChatListScreen = () => {
{chatsStatus === Status.SUCCESS ? (
<FlatList
data={chats}
contentContainerStyle={styles.listContainer}
renderItem={({ item, index }) => <ChatListItem chat={item} />}
keyExtractor={(item) => item.chat_id}
ListEmptyComponent={() => (
Expand Down
7 changes: 4 additions & 3 deletions packages/mobile/src/screens/chat-screen/ChatScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ const useStyles = makeStyles(({ spacing, palette, typography }) => ({
listContainer: {
flex: 1
},
flatListContainer: {
listContentContainer: {
paddingHorizontal: spacing(6),
display: 'flex'
display: 'flex',
height: '100%'
},
composeView: {
paddingVertical: spacing(2),
Expand Down Expand Up @@ -360,7 +361,7 @@ export const ChatScreen = () => {
chatMessages?.length > 0 ? (
<View style={styles.listContainer}>
<FlatList
contentContainerStyle={styles.flatListContainer}
contentContainerStyle={styles.listContentContainer}
data={chatMessages}
keyExtractor={(message) => message.message_id}
renderItem={({ item, index }) => (
Expand Down

0 comments on commit 81ef3b3

Please sign in to comment.