Fix new link scenario where default color is not set

Co-authored-by: Josh Perez <60019601+josh-signal@users.noreply.github.com>
This commit is contained in:
Fedor Indutny
2021-06-08 12:55:52 -07:00
committed by GitHub
parent 8a429ad5a3
commit e6ffaafe39

View File

@@ -79,6 +79,14 @@ export async function startApp(): Promise<void> {
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<void>(resolve => {
resolveOnAppView = resolve;
@@ -412,12 +420,6 @@ export async function startApp(): Promise<void> {
}
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;