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

This commit is contained in:
Scott Nonnenberg 2021-12-07 11:20:40 -08:00 committed by GitHub
parent 419d1ca176
commit 983477c354
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1776,7 +1776,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 {