Upgrade Prettier to 2.4.1
This commit is contained in:
parent
f204784afe
commit
5619eeca83
176 changed files with 1961 additions and 2465 deletions
|
@ -269,18 +269,15 @@ export class CallingClass {
|
|||
|
||||
RingRTC.handleOutgoingSignaling = this.handleOutgoingSignaling.bind(this);
|
||||
RingRTC.handleIncomingCall = this.handleIncomingCall.bind(this);
|
||||
RingRTC.handleAutoEndedIncomingCallRequest = this.handleAutoEndedIncomingCallRequest.bind(
|
||||
this
|
||||
);
|
||||
RingRTC.handleAutoEndedIncomingCallRequest =
|
||||
this.handleAutoEndedIncomingCallRequest.bind(this);
|
||||
RingRTC.handleLogMessage = this.handleLogMessage.bind(this);
|
||||
RingRTC.handleSendHttpRequest = this.handleSendHttpRequest.bind(this);
|
||||
RingRTC.handleSendCallMessage = this.handleSendCallMessage.bind(this);
|
||||
RingRTC.handleSendCallMessageToGroup = this.handleSendCallMessageToGroup.bind(
|
||||
this
|
||||
);
|
||||
RingRTC.handleGroupCallRingUpdate = this.handleGroupCallRingUpdate.bind(
|
||||
this
|
||||
);
|
||||
RingRTC.handleSendCallMessageToGroup =
|
||||
this.handleSendCallMessageToGroup.bind(this);
|
||||
RingRTC.handleGroupCallRingUpdate =
|
||||
this.handleGroupCallRingUpdate.bind(this);
|
||||
|
||||
this.attemptToGiveOurUuidToRingRtc();
|
||||
window.Whisper.events.on('userChanged', () => {
|
||||
|
@ -402,9 +399,8 @@ export class CallingClass {
|
|||
this.uxActions.showCallLobby({
|
||||
callMode: CallMode.Group,
|
||||
conversationId: conversationProps.id,
|
||||
isConversationTooBigToRing: isConversationTooBigToRing(
|
||||
conversationProps
|
||||
),
|
||||
isConversationTooBigToRing:
|
||||
isConversationTooBigToRing(conversationProps),
|
||||
...this.formatGroupCallForRedux(groupCall),
|
||||
});
|
||||
break;
|
||||
|
@ -708,9 +704,8 @@ export class CallingClass {
|
|||
hasLocalVideo: boolean,
|
||||
shouldRing: boolean
|
||||
): Promise<void> {
|
||||
const conversation = window.ConversationController.get(
|
||||
conversationId
|
||||
)?.format();
|
||||
const conversation =
|
||||
window.ConversationController.get(conversationId)?.format();
|
||||
if (!conversation) {
|
||||
log.error('Missing conversation; not joining group call');
|
||||
return;
|
||||
|
@ -999,9 +994,8 @@ export class CallingClass {
|
|||
declineGroupCall(conversationId: string, ringId: bigint): void {
|
||||
log.info('CallingClass.declineGroupCall()');
|
||||
|
||||
const groupId = window.ConversationController.get(conversationId)?.get(
|
||||
'groupId'
|
||||
);
|
||||
const groupId =
|
||||
window.ConversationController.get(conversationId)?.get('groupId');
|
||||
if (!groupId) {
|
||||
log.error(
|
||||
'declineGroupCall: could not find the group ID for that conversation'
|
||||
|
@ -1300,11 +1294,8 @@ export class CallingClass {
|
|||
);
|
||||
}
|
||||
|
||||
const {
|
||||
availableCameras,
|
||||
availableMicrophones,
|
||||
availableSpeakers,
|
||||
} = await this.getAvailableIODevices();
|
||||
const { availableCameras, availableMicrophones, availableSpeakers } =
|
||||
await this.getAvailableIODevices();
|
||||
|
||||
const preferredMicrophone = window.Events.getPreferredAudioInputDevice();
|
||||
const selectedMicIndex = findBestMatchingAudioDeviceIndex({
|
||||
|
@ -1394,9 +1385,8 @@ export class CallingClass {
|
|||
|
||||
const { storage } = window.textsecure;
|
||||
|
||||
const senderIdentityRecord = await storage.protocol.getOrMigrateIdentityRecord(
|
||||
new UUID(remoteUserId)
|
||||
);
|
||||
const senderIdentityRecord =
|
||||
await storage.protocol.getOrMigrateIdentityRecord(new UUID(remoteUserId));
|
||||
if (!senderIdentityRecord) {
|
||||
log.error('Missing sender identity record; ignoring call message.');
|
||||
return;
|
||||
|
|
|
@ -10,7 +10,7 @@ let layoutMap: LayoutMapType | undefined;
|
|||
export async function initialize(): Promise<void> {
|
||||
strictAssert(layoutMap === undefined, 'keyboardLayout already initialized');
|
||||
|
||||
const experimentalNavigator = (window.navigator as unknown) as {
|
||||
const experimentalNavigator = window.navigator as unknown as {
|
||||
keyboard: { getLayoutMap(): Promise<LayoutMapType> };
|
||||
};
|
||||
|
||||
|
|
|
@ -42,10 +42,8 @@ import * as log from '../logging/log';
|
|||
|
||||
type IManifestRecordIdentifier = Proto.ManifestRecord.IIdentifier;
|
||||
|
||||
const {
|
||||
eraseStorageServiceStateFromConversations,
|
||||
updateConversation,
|
||||
} = dataInterface;
|
||||
const { eraseStorageServiceStateFromConversations, updateConversation } =
|
||||
dataInterface;
|
||||
|
||||
const uploadBucket: Array<number> = [];
|
||||
|
||||
|
@ -604,11 +602,8 @@ async function createNewManifest() {
|
|||
|
||||
const version = window.storage.get('manifestVersion', 0);
|
||||
|
||||
const {
|
||||
conversationsToUpdate,
|
||||
newItems,
|
||||
storageManifest,
|
||||
} = await generateManifest(version, undefined, true);
|
||||
const { conversationsToUpdate, newItems, storageManifest } =
|
||||
await generateManifest(version, undefined, true);
|
||||
|
||||
await uploadManifest(version, {
|
||||
conversationsToUpdate,
|
||||
|
@ -650,7 +645,8 @@ async function fetchManifest(
|
|||
}
|
||||
|
||||
try {
|
||||
const credentials = await window.textsecure.messaging.getStorageCredentials();
|
||||
const credentials =
|
||||
await window.textsecure.messaging.getStorageCredentials();
|
||||
window.storage.put('storageCredentials', credentials);
|
||||
|
||||
const manifestBinary = await window.textsecure.messaging.getStorageManifest(
|
||||
|
@ -869,12 +865,13 @@ async function processRemoteRecords(
|
|||
);
|
||||
|
||||
const credentials = window.storage.get('storageCredentials');
|
||||
const storageItemsBuffer = await window.textsecure.messaging.getStorageRecords(
|
||||
Proto.ReadOperation.encode(readOperation).finish(),
|
||||
{
|
||||
credentials,
|
||||
}
|
||||
);
|
||||
const storageItemsBuffer =
|
||||
await window.textsecure.messaging.getStorageRecords(
|
||||
Proto.ReadOperation.encode(readOperation).finish(),
|
||||
{
|
||||
credentials,
|
||||
}
|
||||
);
|
||||
|
||||
const storageItems = Proto.StorageItems.decode(storageItemsBuffer);
|
||||
|
||||
|
@ -959,10 +956,11 @@ async function processRemoteRecords(
|
|||
// Collect full map of previously and currently unknown records
|
||||
const unknownRecords: Map<string, UnknownRecord> = new Map();
|
||||
|
||||
const unknownRecordsArray: ReadonlyArray<UnknownRecord> = window.storage.get(
|
||||
'storage-service-unknown-records',
|
||||
new Array<UnknownRecord>()
|
||||
);
|
||||
const unknownRecordsArray: ReadonlyArray<UnknownRecord> =
|
||||
window.storage.get(
|
||||
'storage-service-unknown-records',
|
||||
new Array<UnknownRecord>()
|
||||
);
|
||||
unknownRecordsArray.forEach((record: UnknownRecord) => {
|
||||
unknownRecords.set(record.storageID, record);
|
||||
});
|
||||
|
|
|
@ -246,7 +246,8 @@ export async function toAccountRecord(
|
|||
const pinnedConversation = window.ConversationController.get(id);
|
||||
|
||||
if (pinnedConversation) {
|
||||
const pinnedConversationRecord = new Proto.AccountRecord.PinnedConversation();
|
||||
const pinnedConversationRecord =
|
||||
new Proto.AccountRecord.PinnedConversation();
|
||||
|
||||
if (pinnedConversation.get('type') === 'private') {
|
||||
pinnedConversationRecord.identifier = 'contact';
|
||||
|
@ -953,9 +954,8 @@ export async function mergeAccountRecord(
|
|||
let conversationId: string | undefined;
|
||||
|
||||
if (contact) {
|
||||
conversationId = window.ConversationController.ensureContactIds(
|
||||
contact
|
||||
);
|
||||
conversationId =
|
||||
window.ConversationController.ensureContactIds(contact);
|
||||
} else if (legacyGroupId && legacyGroupId.length) {
|
||||
conversationId = Bytes.toBinary(legacyGroupId);
|
||||
} else if (groupMasterKey && groupMasterKey.length) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue