aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-04-06 15:35:22 -0400
committerIvan Chen <ivan@tagg.id>2021-04-06 15:35:22 -0400
commit4b0e55cd751bd77e05b8158177a74bd190974218 (patch)
treee461f98ef710b7fe1b3508fd651684cbd147e293 /src
parent28218a67a6630863d57f1699e8453155ee5f2aa3 (diff)
added check for client ready
Diffstat (limited to 'src')
-rw-r--r--src/screens/chat/ChatListScreen.tsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/screens/chat/ChatListScreen.tsx b/src/screens/chat/ChatListScreen.tsx
index 0d180b98..801a9d19 100644
--- a/src/screens/chat/ChatListScreen.tsx
+++ b/src/screens/chat/ChatListScreen.tsx
@@ -45,10 +45,11 @@ const ChatListScreen: React.FC<ChatListScreenProps> = ({navigation}) => {
);
return setClientReady(true);
};
-
- setupClient().catch((err) => {
- console.error(err);
- });
+ if (!clientReady) {
+ setupClient().catch((err) => {
+ console.error(err);
+ });
+ }
}, []);
return (