From 2e728d99f9460f1e52461a57f181197464f7fed3 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 22 Sep 2022 14:36:46 -0500 Subject: [PATCH] ChatWidget: remove 'direct' streaming (it uses the 'user' stream) --- .../features/chats/components/chat-widget.tsx | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/app/soapbox/features/chats/components/chat-widget.tsx b/app/soapbox/features/chats/components/chat-widget.tsx index c403274ed..bd72f1e02 100644 --- a/app/soapbox/features/chats/components/chat-widget.tsx +++ b/app/soapbox/features/chats/components/chat-widget.tsx @@ -1,26 +1,16 @@ -import React, { useEffect } from 'react'; +import React from 'react'; -import { connectDirectStream } from 'soapbox/actions/streaming'; import { ChatProvider } from 'soapbox/contexts/chat-context'; -import { useAppDispatch, useOwnAccount } from 'soapbox/hooks'; +import { useOwnAccount } from 'soapbox/hooks'; import ChatPane from './chat-pane/chat-pane'; const ChatWidget = () => { const account = useOwnAccount(); - const dispatch = useAppDispatch(); const path = location.pathname; const shouldHideWidget = Boolean(path.match(/^\/chats/)); - useEffect(() => { - const disconnect = dispatch(connectDirectStream()); - - return (() => { - disconnect(); - }); - }, []); - if (!account?.chats_onboarded || shouldHideWidget) { return null; }