Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Add a settings store check to make the menu code easy to find again
Browse files Browse the repository at this point in the history
... and because we probably should check this...
  • Loading branch information
turt2live committed May 6, 2022
1 parent e52c7fe commit b2bf5aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/views/context_menus/WidgetContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ const WidgetContextMenu: React.FC<IProps> = ({
}

let snapshotButton;
if (widgetMessaging?.hasCapability(MatrixCapabilities.Screenshots)) {
const screenshotsEnabled = SettingsStore.getValue("enableWidgetScreenshots");
if (screenshotsEnabled && widgetMessaging?.hasCapability(MatrixCapabilities.Screenshots)) {
const onSnapshotClick = () => {
widgetMessaging?.takeScreenshot().then(data => {
dis.dispatch({
Expand Down

0 comments on commit b2bf5aa

Please sign in to comment.