Conversation: Prevent getProps errors on initial link

Co-authored-by: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com>
This commit is contained in:
Scott Nonnenberg 2021-06-08 14:31:35 -07:00 committed by GitHub
parent e4a632f601
commit f226822dff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 51 additions and 36 deletions

View file

@ -11,6 +11,7 @@ import { DataMessageClass } from './textsecure.d';
import { MessageAttributesType } from './model-types.d';
import { WhatIsThis } from './window.d';
import { getTitleBarVisibility, TitleBarVisibility } from './types/Settings';
import { DEFAULT_CONVERSATION_COLOR } from './types/Colors';
import { ChallengeHandler } from './challenge';
import { isWindowDragElement } from './util/isWindowDragElement';
import { assert } from './util/assert';
@ -83,9 +84,10 @@ export async function startApp(): Promise<void> {
window.storage.onready(() => {
if (!window.storage.get('defaultConversationColor')) {
window.storage.put('defaultConversationColor', {
color: 'ultramarine',
});
window.storage.put(
'defaultConversationColor',
DEFAULT_CONVERSATION_COLOR
);
}
});