Startup: If we don't have core data available, show 'link device' screen

This commit is contained in:
Scott Nonnenberg 2021-12-07 15:18:55 -08:00 committed by GitHub
parent a11e0a3ea0
commit d7edff196c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -1781,7 +1781,12 @@ export async function startApp(): Promise<void> {
window.Whisper.ExpiringMessagesListener.init(window.Whisper.events);
window.Whisper.TapToViewMessagesListener.init(window.Whisper.events);
if (window.Signal.Util.Registration.everDone()) {
const isCoreDataValid = Boolean(
window.textsecure.storage.user.getUuid() &&
window.ConversationController.getOurConversation()
);
if (isCoreDataValid && window.Signal.Util.Registration.everDone()) {
connect();
window.reduxActions.app.openInbox();
} else {