From 67392cbc124225a7fe30aa6884a0042fbe578a88 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 1 Jul 2021 20:14:39 -0500 Subject: [PATCH] Chats: don't render ChatList unless mainWindow is open for performance --- app/soapbox/features/chats/components/chat_panes.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/soapbox/features/chats/components/chat_panes.js b/app/soapbox/features/chats/components/chat_panes.js index 421135c34..b1672c127 100644 --- a/app/soapbox/features/chats/components/chat_panes.js +++ b/app/soapbox/features/chats/components/chat_panes.js @@ -40,6 +40,7 @@ class ChatPanes extends ImmutablePureComponent { render() { const { panes, mainWindowState, unreadCount } = this.props; + const open = mainWindowState === 'open'; const mainWindowPane = (
@@ -51,10 +52,10 @@ class ChatPanes extends ImmutablePureComponent {
- } - /> + />}
);