aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/screens/chat/ChatListScreen.tsx21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/screens/chat/ChatListScreen.tsx b/src/screens/chat/ChatListScreen.tsx
index a019891a..f9db0c77 100644
--- a/src/screens/chat/ChatListScreen.tsx
+++ b/src/screens/chat/ChatListScreen.tsx
@@ -45,19 +45,16 @@ const ChatListScreen: React.FC<ChatListScreenProps> = () => {
);
useEffect(() => {
- let connected: boolean = !chatClient.user;
- if (!connected) {
- connectChatAccount(loggedInUserId, chatClient)
- .then((success) => {
- if (!success) {
- Alert.alert('Something wrong with chat');
- }
- })
- .catch((err) => {
- console.log('Error connecting to chat: ', err);
+ connectChatAccount(loggedInUserId, chatClient)
+ .then((success) => {
+ if (!success) {
Alert.alert('Something wrong with chat');
- });
- }
+ }
+ })
+ .catch((err) => {
+ console.log('Error connecting to chat: ', err);
+ Alert.alert('Something wrong with chat');
+ });
}, []);
return (