You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
Add a settings store check to make the menu code easy to find again
... and because we probably should check this...
This commit is contained in:
@@ -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({
|
||||||
|
|||||||
Reference in New Issue
Block a user