From 5c2817de98e052976e607bd0d295d7d8ce00c34c Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Tue, 5 Dec 2023 16:54:33 -0500 Subject: [PATCH] Revert "temporarily disable member list fetching" This reverts commit 9819c8d2f69721ab5cb648608b37496ba04ebbfe. --- src/components/messaging/Chat.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/messaging/Chat.tsx b/src/components/messaging/Chat.tsx index 62a1fe8..1924bd0 100644 --- a/src/components/messaging/Chat.tsx +++ b/src/components/messaging/Chat.tsx @@ -1,4 +1,6 @@ +import { runInAction } from "mobx"; import { observer } from "mobx-react-lite"; +import React from "react"; import styled from "styled-components"; import useLogger from "../../hooks/useLogger"; import { useAppStore } from "../../stores/AppStore"; @@ -79,13 +81,13 @@ function Chat() { const app = useAppStore(); const logger = useLogger("Messages"); - // React.useEffect(() => { - // if (!app.activeChannel || !app.activeGuild || app.activeChannelId === "@me") return; + React.useEffect(() => { + if (!app.activeChannel || !app.activeGuild || app.activeChannelId === "@me") return; - // runInAction(() => { - // app.gateway.onChannelOpen(app.activeGuildId!, app.activeChannelId!); - // }); - // }, [app.activeChannel, app.activeGuild]); + runInAction(() => { + app.gateway.onChannelOpen(app.activeGuildId!, app.activeChannelId!); + }); + }, [app.activeChannel, app.activeGuild]); if (app.activeGuildId && app.activeGuildId === "@me") { return (