mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 04:09:49 +00:00
Highlight that dataURLToBlob is synchronous
This commit is contained in:
@@ -104,7 +104,7 @@
|
|||||||
i = i - 1;
|
i = i - 1;
|
||||||
// TODO: Replace with native `Canvas::toBlob`:
|
// TODO: Replace with native `Canvas::toBlob`:
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob
|
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob
|
||||||
blob = window.dataURLToBlob(
|
blob = window.dataURLToBlobSync(
|
||||||
canvas.toDataURL('image/jpeg', quality)
|
canvas.toDataURL('image/jpeg', quality)
|
||||||
);
|
);
|
||||||
quality = quality * maxSize / blob.size;
|
quality = quality * maxSize / blob.size;
|
||||||
@@ -233,7 +233,7 @@
|
|||||||
|
|
||||||
// TODO: Replace with native `Canvas::toBlob`:
|
// TODO: Replace with native `Canvas::toBlob`:
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob
|
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob
|
||||||
var blob = window.dataURLToBlob(canvas.toDataURL('image/png'));
|
var blob = window.dataURLToBlobSync(canvas.toDataURL('image/png'));
|
||||||
|
|
||||||
resolve(blob);
|
resolve(blob);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
window.nodeSetImmediate(function() {});
|
window.nodeSetImmediate(function() {});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
window.dataURLToBlob = require('blueimp-canvas-to-blob');
|
window.dataURLToBlobSync = require('blueimp-canvas-to-blob');
|
||||||
window.loadImage = require('blueimp-load-image');
|
window.loadImage = require('blueimp-load-image');
|
||||||
window.ProxyAgent = require('proxy-agent');
|
window.ProxyAgent = require('proxy-agent');
|
||||||
window.EmojiConvertor = require('emoji-js');
|
window.EmojiConvertor = require('emoji-js');
|
||||||
|
|||||||
Reference in New Issue
Block a user