From 2f1a60fce73d075914172a71067779098d9eef1e Mon Sep 17 00:00:00 2001 From: HF Date: Sun, 14 Aug 2022 21:51:30 +0200 Subject: [PATCH] state debug --- src/components/WindowManager.jsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/components/WindowManager.jsx b/src/components/WindowManager.jsx index 3ea0495..5eab13a 100644 --- a/src/components/WindowManager.jsx +++ b/src/components/WindowManager.jsx @@ -14,11 +14,21 @@ import { // eslint-disable-next-line max-len const selectWindowIds = (state) => state.windows.windows.map((win) => win.windowId); // eslint-disable-next-line max-len -const selectMeta = (state) => [state.windows.showWindows, state.windows.someFullscreen]; +const selectMeta = (state) => { + console.log('check'); + return [ + state.windows.showWindows, + state.windows.someFullscreen, + state.windows.windows.some((win) => win.fullscreen && win.open && !win.hidden), +]}; const WindowManager = () => { const windowIds = useSelector(selectWindowIds, shallowEqual); - const [showWindows, someFullscreen] = useSelector(selectMeta, shallowEqual); + const [ + showWindows, + someFullscreen, + someOpenFullscreen, + ] = useSelector(selectMeta, shallowEqual); const dispatch = useDispatch(); if ((!showWindows && !someFullscreen) || !windowIds.length) { @@ -28,7 +38,7 @@ const WindowManager = () => { return (
dispatch(closeFullscreenWindows())} /> {windowIds.map((id) => )}