Ensure storage is ready before starting sender certificate service

This commit is contained in:
Evan Hahn 2021-04-14 15:12:40 -05:00 committed by Scott Nonnenberg
parent 1ca121aef5
commit 2ee5f57516

View file

@ -31,6 +31,7 @@ export async function startApp(): Promise<void> {
}
window.textsecure.protobuf.onLoad(() => {
window.storage.onready(() => {
senderCertificateService.initialize({
WebAPI: window.WebAPI,
navigator,
@ -39,6 +40,7 @@ export async function startApp(): Promise<void> {
storage: window.storage,
});
});
});
const eventHandlerQueue = new window.PQueue({
concurrency: 1,