Revert "MessageReceiver: Pause processing of new messages on suspend"
This reverts commit d74424a3b8
.
This commit is contained in:
parent
a2a9500728
commit
3c836908aa
2 changed files with 1 additions and 19 deletions
|
@ -1564,15 +1564,13 @@ export async function startApp(): Promise<void> {
|
|||
|
||||
window.Whisper.events.on('powerMonitorSuspend', () => {
|
||||
log.info('powerMonitor: suspend');
|
||||
messageReceiver?.pause();
|
||||
suspendTasksWithTimeout();
|
||||
});
|
||||
|
||||
window.Whisper.events.on('powerMonitorResume', () => {
|
||||
log.info('powerMonitor: resume');
|
||||
messageReceiver?.resume();
|
||||
resumeTasksWithTimeout();
|
||||
server?.checkSockets();
|
||||
resumeTasksWithTimeout();
|
||||
});
|
||||
|
||||
window.Whisper.events.on('powerMonitorLockScreen', () => {
|
||||
|
|
|
@ -187,22 +187,6 @@ export default class MessageReceiver
|
|||
|
||||
private stoppingProcessing?: boolean;
|
||||
|
||||
pause(): void {
|
||||
this.incomingQueue.pause();
|
||||
this.encryptedQueue.pause();
|
||||
this.decryptedQueue.pause();
|
||||
this.appQueue.pause();
|
||||
log.info('MessageReceiver: Paused');
|
||||
}
|
||||
|
||||
resume(): void {
|
||||
this.appQueue.start();
|
||||
this.decryptedQueue.start();
|
||||
this.encryptedQueue.start();
|
||||
this.incomingQueue.start();
|
||||
log.info('MessageReceiver: Resumed');
|
||||
}
|
||||
|
||||
constructor({ server, storage, serverTrustRoot }: MessageReceiverOptions) {
|
||||
super();
|
||||
|
||||
|
|
Loading…
Reference in a new issue