diff --git a/packages/webamp/CHANGELOG.md b/packages/webamp/CHANGELOG.md index 78adb6e9..9b7501d4 100644 --- a/packages/webamp/CHANGELOG.md +++ b/packages/webamp/CHANGELOG.md @@ -20,6 +20,7 @@ - Fix bug where scrolling the main window or playlist window would change the volume but also (incorrectly) scroll the page. - Fix bug where resizing the window such that the current layout cannot fit on the page, while also scrolled down the page, would cause the layout to be recentered out of view. - Avoid a console log from Redux Dev Tools. +- Don't show Milkdrop window option in context menu if Milkdrop is not enabled. ## 2.1.2 [CURRENT] diff --git a/packages/webamp/js/components/MainWindow/MainContextMenu.tsx b/packages/webamp/js/components/MainWindow/MainContextMenu.tsx index b091b5a6..6cc84a9e 100644 --- a/packages/webamp/js/components/MainWindow/MainContextMenu.tsx +++ b/packages/webamp/js/components/MainWindow/MainContextMenu.tsx @@ -1,7 +1,7 @@ import { memo, Fragment, useEffect } from "react"; import * as Actions from "../../actionCreators"; import * as Selectors from "../../selectors"; -import { LOAD_STYLE } from "../../constants"; +import { LOAD_STYLE, WINDOWS } from "../../constants"; import { Hr, Node, Parent, LinkNode } from "../ContextMenu"; import PlaybackContextMenu from "../PlaybackContextMenu"; import OptionsContextMenu from "../OptionsContextMenu"; @@ -24,6 +24,8 @@ const MainContextMenu = memo(({ filePickers }: Props) => { const menuOpened = useActionCreator(() => ({ type: "MAIN_CONTEXT_MENU_OPENED", })); + const isMilkdropEnabled = useTypedSelector(Selectors.getMilkdropEnabled); + useEffect(() => { menuOpened(); }, [menuOpened]); @@ -59,15 +61,20 @@ const MainContextMenu = memo(({ filePickers }: Props) => { )}