Skip to content

Commit

Permalink
fix fullscreen menu disappearing (#141128)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 authored Sep 21, 2022
1 parent 2e2bc2c commit 4118e2e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import { setToggleFullscreen } from './lens_slice';
/** cancels updates to the store that don't change the state */
export const fullscreenMiddleware = (storeDeps: LensStoreDeps) => (store: MiddlewareAPI) => {
return (next: Dispatch) => (action: Action) => {
next(action);
if (setToggleFullscreen.match(action)) {
const isFullscreen = (store.getState as LensGetState)().lens.isFullscreenDatasource;
storeDeps.lensServices.chrome.setIsVisible(!isFullscreen);
storeDeps.lensServices.chrome.setIsVisible(Boolean(isFullscreen));
}
next(action);
};
};

0 comments on commit 4118e2e

Please sign in to comment.