Upgrade Prettier
This commit is contained in:
parent
d14c8e2277
commit
0d3b390129
57 changed files with 1074 additions and 1574 deletions
|
@ -498,9 +498,7 @@
|
|||
idleDetector = new IdleDetector();
|
||||
let isMigrationWithIndexComplete = false;
|
||||
window.log.info(
|
||||
`Starting background data migration. Target version: ${
|
||||
Message.CURRENT_SCHEMA_VERSION
|
||||
}`
|
||||
`Starting background data migration. Target version: ${Message.CURRENT_SCHEMA_VERSION}`
|
||||
);
|
||||
idleDetector.on('idle', async () => {
|
||||
const NUM_MESSAGES_PER_BATCH = 1;
|
||||
|
@ -1611,7 +1609,9 @@
|
|||
const ourNumber = textsecure.storage.user.getNumber();
|
||||
const { wrap, sendOptions } = ConversationController.prepareForSend(
|
||||
ourNumber,
|
||||
{ syncMessage: true }
|
||||
{
|
||||
syncMessage: true,
|
||||
}
|
||||
);
|
||||
|
||||
const installedStickerPacks = window.Signal.Stickers.getInstalledStickerPacks();
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
'use strict';
|
||||
|
||||
/*
|
||||
* This file extends the libphonenumber object with a set of phonenumbery
|
||||
* utility functions. libphonenumber must be included before you call these
|
||||
* functions, but the order of the files/script-tags doesn't matter.
|
||||
*/
|
||||
* This file extends the libphonenumber object with a set of phonenumbery
|
||||
* utility functions. libphonenumber must be included before you call these
|
||||
* functions, but the order of the files/script-tags doesn't matter.
|
||||
*/
|
||||
|
||||
window.libphonenumber = window.libphonenumber || {};
|
||||
window.libphonenumber.util = {
|
||||
|
|
|
@ -955,7 +955,9 @@
|
|||
const ourNumber = textsecure.storage.user.getNumber();
|
||||
const { wrap, sendOptions } = ConversationController.prepareForSend(
|
||||
ourNumber,
|
||||
{ syncMessage: true }
|
||||
{
|
||||
syncMessage: true,
|
||||
}
|
||||
);
|
||||
|
||||
await wrap(
|
||||
|
@ -1480,7 +1482,9 @@
|
|||
const ourNumber = textsecure.storage.user.getNumber();
|
||||
const { wrap, sendOptions } = ConversationController.prepareForSend(
|
||||
ourNumber,
|
||||
{ syncMessage: true }
|
||||
{
|
||||
syncMessage: true,
|
||||
}
|
||||
);
|
||||
|
||||
this.syncPromise = this.syncPromise || Promise.resolve();
|
||||
|
|
|
@ -396,7 +396,7 @@ function getRandomValue(low, high) {
|
|||
|
||||
// Because high and low are inclusive
|
||||
const mod = diff + 1;
|
||||
return bytes[0] % mod + low;
|
||||
return (bytes[0] % mod) + low;
|
||||
}
|
||||
|
||||
function getZeroes(n) {
|
||||
|
@ -454,9 +454,7 @@ function splitBytes(buffer, ...lengths) {
|
|||
|
||||
if (total !== buffer.byteLength) {
|
||||
throw new Error(
|
||||
`Requested lengths total ${total} does not match source total ${
|
||||
buffer.byteLength
|
||||
}`
|
||||
`Requested lengths total ${total} does not match source total ${buffer.byteLength}`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ function _getString(thing) {
|
|||
return thing;
|
||||
}
|
||||
|
||||
// prettier-ignore
|
||||
function _b64ToUint6(nChr) {
|
||||
return nChr > 64 && nChr < 91
|
||||
? nChr - 65
|
||||
|
|
|
@ -1098,9 +1098,7 @@
|
|||
const data = await readDraftData(attachment.path);
|
||||
if (data.byteLength !== attachment.size) {
|
||||
window.log.error(
|
||||
`Attachment size from disk ${
|
||||
data.byteLength
|
||||
} did not match attachment size ${attachment.size}`
|
||||
`Attachment size from disk ${data.byteLength} did not match attachment size ${attachment.size}`
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
@ -1411,7 +1409,7 @@
|
|||
blob = window.dataURLToBlobSync(
|
||||
canvas.toDataURL(targetContentType, quality)
|
||||
);
|
||||
quality = quality * maxSize / blob.size;
|
||||
quality = (quality * maxSize) / blob.size;
|
||||
// NOTE: During testing with a large image, we observed the
|
||||
// `quality` value being > 1. Should we clamp it to [0.5, 1.0]?
|
||||
// See: https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob#Syntax
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
window.Whisper = window.Whisper || {};
|
||||
|
||||
/*
|
||||
* Render an avatar identicon to an svg for use in a notification.
|
||||
*/
|
||||
* Render an avatar identicon to an svg for use in a notification.
|
||||
*/
|
||||
Whisper.IdenticonSVGView = Whisper.View.extend({
|
||||
templateName: 'identicon-svg',
|
||||
initialize(options) {
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
window.Whisper = window.Whisper || {};
|
||||
|
||||
/*
|
||||
* Generic list view that watches a given collection, wraps its members in
|
||||
* a given child view and adds the child view elements to its own element.
|
||||
*/
|
||||
* Generic list view that watches a given collection, wraps its members in
|
||||
* a given child view and adds the child view elements to its own element.
|
||||
*/
|
||||
Whisper.ListView = Backbone.View.extend({
|
||||
tagName: 'ul',
|
||||
itemView: Backbone.View,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue