From e6ffaafe397fc3af5dd3cd6e53b36c2eb5e12405 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Tue, 8 Jun 2021 12:55:52 -0700 Subject: [PATCH] Fix new link scenario where default color is not set Co-authored-by: Josh Perez <60019601+josh-signal@users.noreply.github.com> --- ts/background.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ts/background.ts b/ts/background.ts index c2a8242fd5..aedb6f1a21 100644 --- a/ts/background.ts +++ b/ts/background.ts @@ -79,6 +79,14 @@ export async function startApp(): Promise { ourProfileKeyService.initialize(window.storage); + window.storage.onready(() => { + if (!window.storage.get('defaultConversationColor')) { + window.storage.put('defaultConversationColor', { + color: 'ultramarine', + }); + } + }); + let resolveOnAppView: (() => void) | undefined; const onAppView = new Promise(resolve => { resolveOnAppView = resolve; @@ -412,12 +420,6 @@ export async function startApp(): Promise { } first = false; - if (!window.storage.get('defaultConversationColor')) { - window.storage.put('defaultConversationColor', { - color: 'ultramarine', - }); - } - cleanupSessionResets(); const retryPlaceholders = new window.Signal.Util.RetryPlaceholders(); window.Signal.Services.retryPlaceholders = retryPlaceholders;