mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Removed hard limit on unprocessed messages in cache
This commit is contained in:
@@ -2012,12 +2012,24 @@ export class SignalProtocolStore extends EventEmitter {
|
||||
});
|
||||
}
|
||||
|
||||
getAllUnprocessedAndIncrementAttempts(): Promise<Array<UnprocessedType>> {
|
||||
return this.withZone(GLOBAL_ZONE, 'getAllUnprocessed', async () => {
|
||||
return window.Signal.Data.getAllUnprocessedAndIncrementAttempts();
|
||||
getAllUnprocessedIds(): Promise<Array<string>> {
|
||||
return this.withZone(GLOBAL_ZONE, 'getAllUnprocessedIds', () => {
|
||||
return window.Signal.Data.getAllUnprocessedIds();
|
||||
});
|
||||
}
|
||||
|
||||
getUnprocessedByIdsAndIncrementAttempts(
|
||||
ids: ReadonlyArray<string>
|
||||
): Promise<Array<UnprocessedType>> {
|
||||
return this.withZone(
|
||||
GLOBAL_ZONE,
|
||||
'getAllUnprocessedByIdsAndIncrementAttempts',
|
||||
async () => {
|
||||
return window.Signal.Data.getUnprocessedByIdsAndIncrementAttempts(ids);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
getUnprocessedById(id: string): Promise<UnprocessedType | undefined> {
|
||||
return this.withZone(GLOBAL_ZONE, 'getUnprocessedById', async () => {
|
||||
return window.Signal.Data.getUnprocessedById(id);
|
||||
@@ -2080,7 +2092,9 @@ export class SignalProtocolStore extends EventEmitter {
|
||||
});
|
||||
}
|
||||
|
||||
/** only for testing */
|
||||
removeAllUnprocessed(): Promise<void> {
|
||||
log.info('removeAllUnprocessed');
|
||||
return this.withZone(GLOBAL_ZONE, 'removeAllUnprocessed', async () => {
|
||||
await window.Signal.Data.removeAllUnprocessed();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user