From 010d02caca4553dd097dc1892a18eb71e9d971cb Mon Sep 17 00:00:00 2001 From: dank074 Date: Thu, 17 Mar 2022 19:31:40 -0500 Subject: [PATCH] fix some outgoing packets --- src/components/achievements/AchievementsView.tsx | 2 +- src/components/navigator/NavigatorView.tsx | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/achievements/AchievementsView.tsx b/src/components/achievements/AchievementsView.tsx index 05e6db94..08521fb5 100644 --- a/src/components/achievements/AchievementsView.tsx +++ b/src/components/achievements/AchievementsView.tsx @@ -197,7 +197,7 @@ export const AchievementsView: FC<{}> = props => useEffect(() => { - if(!isVisible || !isInitalized) return; + if(!isVisible || isInitalized) return; SendMessageComposer(new RequestAchievementsMessageComposer()); }, [ isVisible, isInitalized ]); diff --git a/src/components/navigator/NavigatorView.tsx b/src/components/navigator/NavigatorView.tsx index 0f65ba0d..d8cee5ff 100644 --- a/src/components/navigator/NavigatorView.tsx +++ b/src/components/navigator/NavigatorView.tsx @@ -220,10 +220,13 @@ export const NavigatorView: FC<{}> = props => flag: false } }); - - SendMessageComposer(new NavigatorInitComposer()); }, [ isVisible, needsNavigatorUpdate ]); + useEffect(() => + { + SendMessageComposer(new NavigatorInitComposer()); + }, []); + useEffect(() => { if(!topLevelContexts || !topLevelContexts.length) return;