Add a settings store check to make the menu code easy to find again

... and because we probably should check this...
t3chguy/dedup-icons-17oct
Travis Ralston 2022-05-06 13:13:00 -06:00
parent e52c7fe03a
commit b2bf5aacc0
1 changed files with 2 additions and 1 deletions

View File

@ -110,7 +110,8 @@ const WidgetContextMenu: React.FC<IProps> = ({
} }
let snapshotButton; let snapshotButton;
if (widgetMessaging?.hasCapability(MatrixCapabilities.Screenshots)) { const screenshotsEnabled = SettingsStore.getValue("enableWidgetScreenshots");
if (screenshotsEnabled && widgetMessaging?.hasCapability(MatrixCapabilities.Screenshots)) {
const onSnapshotClick = () => { const onSnapshotClick = () => {
widgetMessaging?.takeScreenshot().then(data => { widgetMessaging?.takeScreenshot().then(data => {
dis.dispatch({ dis.dispatch({