Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
updateAsync: async ({ ref }) => {
const { width, height } = Dimensions.get('window');
const options = {
format: 'png',
quality: 0.3,
result: 'file',
height,
width,
};
const uri = await Expo.takeSnapshotAsync(ref, options);
dispatch.screenshot.update(uri);
},
},
updateAsync: async ({ ref }) => {
const { width, height } = Dimensions.get('window');
const options = {
format: 'jpg',
quality: 0.3,
result: 'file',
height,
width,
};
const uri = await takeSnapshotAsync(ref, options);
dispatch.screenshot.update(uri);
},
},
takeScreenshot = async () => {
if (this.screenShotTaken || !Settings.isScreenshotEnabled) {
return;
}
this.screenShotTaken = true;
await dispatch.screenshot.updateAsync({
ref: global.gameRef,
width: this._width,
height: this._height,
});
};
takeScreenshot = async () => {
if (this.screenShotTaken) {
return;
}
this.screenShotTaken = true;
await dispatch.screenshot.updateAsync({
ref: global.gameRef,
width: this._width,
height: this._height,
});
};