From acbf890f35817c692cb863faaececf8f9838e0c1 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 22 Sep 2021 11:15:05 -0500 Subject: [PATCH] Chats: fix fetching when instance is delayed --- app/soapbox/features/ui/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/soapbox/features/ui/index.js b/app/soapbox/features/ui/index.js index bc3e7c6fd..5d9321d65 100644 --- a/app/soapbox/features/ui/index.js +++ b/app/soapbox/features/ui/index.js @@ -481,6 +481,12 @@ class UI extends React.PureComponent { componentDidUpdate(prevProps) { this.connectStreaming(); + + const { dispatch, features } = this.props; + + if (features.chats && !prevProps.features.chats) { + dispatch(fetchChats()); + } } componentWillUnmount() {