Parallelize SQL queries
This commit is contained in:
parent
86b4da1ec2
commit
c64762858e
178 changed files with 3377 additions and 3618 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
import type { CallLogEventSyncEvent } from '../textsecure/messageReceiverEvents';
|
||||
import * as log from '../logging/log';
|
||||
import { DataWriter } from '../sql/Client';
|
||||
import type { CallLogEventTarget } from '../types/CallDisposition';
|
||||
import { CallLogEvent } from '../types/CallDisposition';
|
||||
import { missingCaseError } from './missingCaseError';
|
||||
|
@ -28,7 +29,7 @@ export async function onCallLogEventSync(
|
|||
if (type === CallLogEvent.Clear) {
|
||||
log.info('onCallLogEventSync: Clearing call history');
|
||||
try {
|
||||
const messageIds = await window.Signal.Data.clearCallHistory(target);
|
||||
const messageIds = await DataWriter.clearCallHistory(target);
|
||||
updateDeletedMessages(messageIds);
|
||||
} finally {
|
||||
// We want to reset the call history even if the clear fails.
|
||||
|
@ -38,7 +39,7 @@ export async function onCallLogEventSync(
|
|||
} else if (type === CallLogEvent.MarkedAsRead) {
|
||||
log.info('onCallLogEventSync: Marking call history read');
|
||||
try {
|
||||
await window.Signal.Data.markAllCallHistoryRead(target);
|
||||
await DataWriter.markAllCallHistoryRead(target);
|
||||
} finally {
|
||||
window.reduxActions.callHistory.updateCallHistoryUnreadCount();
|
||||
}
|
||||
|
@ -47,7 +48,7 @@ export async function onCallLogEventSync(
|
|||
log.info('onCallLogEventSync: Marking call history read in conversation');
|
||||
try {
|
||||
strictAssert(peerId, 'Missing peerId');
|
||||
await window.Signal.Data.markAllCallHistoryReadInConversation(target);
|
||||
await DataWriter.markAllCallHistoryReadInConversation(target);
|
||||
} finally {
|
||||
window.reduxActions.callHistory.updateCallHistoryUnreadCount();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue