aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/screens/chat/ChatListScreen.tsx5
-rw-r--r--src/screens/chat/ChatScreen.tsx33
2 files changed, 31 insertions, 7 deletions
diff --git a/src/screens/chat/ChatListScreen.tsx b/src/screens/chat/ChatListScreen.tsx
index 605163d2..c11f4d1d 100644
--- a/src/screens/chat/ChatListScreen.tsx
+++ b/src/screens/chat/ChatListScreen.tsx
@@ -1,5 +1,4 @@
import AsyncStorage from '@react-native-community/async-storage';
-import type {DeepPartial, Theme} from 'stream-chat-react-native';
import {useBottomTabBarHeight} from '@react-navigation/bottom-tabs';
import {StackNavigationProp} from '@react-navigation/stack';
import React, {useContext, useEffect, useMemo, useState} from 'react';
@@ -20,9 +19,9 @@ import {
LocalReactionType,
LocalUserType,
} from '../../types';
-
-import NewChatModal from './NewChatModal';
import {HeaderHeight} from '../../utils';
+import NewChatModal from './NewChatModal';
+
type ChatListScreenNavigationProp = StackNavigationProp<
MainStackParams,
'ChatList'
diff --git a/src/screens/chat/ChatScreen.tsx b/src/screens/chat/ChatScreen.tsx
index 7e189be5..baf1e23d 100644
--- a/src/screens/chat/ChatScreen.tsx
+++ b/src/screens/chat/ChatScreen.tsx
@@ -1,7 +1,7 @@
import {useBottomTabBarHeight} from '@react-navigation/bottom-tabs';
import {StackNavigationProp} from '@react-navigation/stack';
import React, {useContext} from 'react';
-import {StyleSheet} from 'react-native';
+import {StyleSheet, View} from 'react-native';
import {SafeAreaView} from 'react-native-safe-area-context';
import {
Channel,
@@ -10,8 +10,9 @@ import {
MessageList,
} from 'stream-chat-react-native';
import {ChatContext} from '../../App';
-import {ChatInput} from '../../components';
+import UpArrowIcon from '../../assets/icons/up_arrow.svg';
import ChatHeader from '../../components/messages/ChatHeader';
+import {TAGG_LIGHT_BLUE} from '../../constants';
import {MainStackParams} from '../../routes';
import {isIPhoneX} from '../../utils';
@@ -34,6 +35,12 @@ const ChatScreen: React.FC<ChatScreenProps> = () => {
},
};
+ const SendButton = () => (
+ <View style={styles.submitButton}>
+ <UpArrowIcon color={'white'} />
+ </View>
+ );
+
return (
<SafeAreaView
style={[
@@ -43,9 +50,16 @@ const ChatScreen: React.FC<ChatScreenProps> = () => {
]}>
<ChatHeader />
<Chat client={chatClient} style={chatTheme}>
- <Channel channel={channel} keyboardVerticalOffset={0}>
+ <Channel
+ channel={channel}
+ keyboardVerticalOffset={0}
+ messageActions={({copyMessage, deleteMessage}) => [
+ copyMessage,
+ deleteMessage,
+ ]}>
<MessageList onThreadSelect={() => {}} />
- <MessageInput Input={ChatInput} />
+ {/* <MessageInput Input={ChatInput} /> */}
+ <MessageInput SendButton={SendButton} />
</Channel>
</Chat>
</SafeAreaView>
@@ -57,6 +71,17 @@ const styles = StyleSheet.create({
backgroundColor: 'white',
flex: 1,
},
+
+ submitButton: {
+ height: 35,
+ width: 35,
+ backgroundColor: TAGG_LIGHT_BLUE,
+ borderRadius: 999,
+ justifyContent: 'center',
+ alignItems: 'center',
+ bottom: -5,
+ alignSelf: 'flex-end',
+ },
});
export default ChatScreen;