diff --git a/package.json b/package.json index 82f1eedb..c03ac7f7 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "@fortawesome/fontawesome-svg-core": "^6.1.0", "@fortawesome/free-solid-svg-icons": "^6.1.0", "@fortawesome/react-fontawesome": "^0.1.17", - "@nitrots/nitro-renderer": "^1.1.11", + "@nitrots/nitro-renderer": "^1.1.13", "animate.css": "^4.1.1", "classnames": "^2.3.1", "cross-env": "^7.0.3", 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..2a40f9ba 100644 --- a/src/components/navigator/NavigatorView.tsx +++ b/src/components/navigator/NavigatorView.tsx @@ -25,7 +25,7 @@ export const NavigatorView: FC<{}> = props => const [ isRoomLinkOpen, setRoomLinkOpen ] = useState(false); const [ pendingDoorState, setPendingDoorState ] = useState<{ roomData: RoomDataParser, state: string }>(null); const [ navigatorState, dispatchNavigatorState ] = useReducer(NavigatorReducer, initialNavigator); - const { needsNavigatorUpdate = false, topLevelContext = null, topLevelContexts = null, homeRoomId } = navigatorState; + const { needsNavigatorUpdate = true, topLevelContext = null, topLevelContexts = null, homeRoomId } = navigatorState; const onNavigatorEvent = useCallback((event: NavigatorEvent) => { @@ -212,7 +212,7 @@ export const NavigatorView: FC<{}> = props => useEffect(() => { - if(!isVisible || !needsNavigatorUpdate) return; + if(!needsNavigatorUpdate) return; dispatchNavigatorState({ type: NavigatorActions.SET_NEEDS_UPDATE, @@ -220,9 +220,16 @@ export const NavigatorView: FC<{}> = props => flag: false } }); - + SendMessageComposer(new NavigatorInitComposer()); - }, [ isVisible, needsNavigatorUpdate ]); + }, [ needsNavigatorUpdate ]); + + useEffect(() => + { + if(!isVisible || !topLevelContext) return; + + sendSearch('', topLevelContext.code); + }, [isVisible, sendSearch, topLevelContext]) useEffect(() => { diff --git a/src/components/room/widgets/choosers/UserChooserWidgetView.tsx b/src/components/room/widgets/choosers/UserChooserWidgetView.tsx index be9ccf5e..6f8641b8 100644 --- a/src/components/room/widgets/choosers/UserChooserWidgetView.tsx +++ b/src/components/room/widgets/choosers/UserChooserWidgetView.tsx @@ -19,7 +19,7 @@ export const UserChooserWidgetView: FC<{}> = props => { if(prevValue) clearTimeout(prevValue); - return setTimeout(() => widgetHandler.processWidgetMessage(new RoomWidgetRequestWidgetMessage(RoomWidgetRequestWidgetMessage.FURNI_CHOOSER)), 100); + return setTimeout(() => widgetHandler.processWidgetMessage(new RoomWidgetRequestWidgetMessage(RoomWidgetRequestWidgetMessage.USER_CHOOSER)), 100); }) }, [ isVisible, widgetHandler ]); diff --git a/yarn.lock b/yarn.lock index dd05459f..309add21 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1426,10 +1426,10 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@nitrots/nitro-renderer@^1.1.11": - version "1.1.11" - resolved "https://registry.yarnpkg.com/@nitrots/nitro-renderer/-/nitro-renderer-1.1.11.tgz#6802fcd8f38b98a3ae42f30bb547ae3883f1eb78" - integrity sha512-FlMRiJqkDnpKQX08EL3llvgKedGx10KV6fRyMYCnhqlE+bpJTpMW9ZpGAaaRn2in2Dw3GaoYGrIeSuKIu2URnA== +"@nitrots/nitro-renderer@^1.1.13": + version "1.1.13" + resolved "https://registry.yarnpkg.com/@nitrots/nitro-renderer/-/nitro-renderer-1.1.13.tgz#0173ebda69c41031903461a21a4b3dfa0bd6fcaa" + integrity sha512-LGk8514m+/+Y50kOdkP7dVG9DXTNPM3kD/U+wDJBw6MPkxe0R2blhwPoELK02jO6Ehfoz5v+nlhNeUTHzRZzeg== dependencies: "@pixi/canvas-renderer" "^6.2.2" "@pixi/extract" "^6.2.2"