diff --git a/src/org/thoughtcrime/securesms/PassphraseRequiredActionBarActivity.java b/src/org/thoughtcrime/securesms/PassphraseRequiredActionBarActivity.java index 63ac891ddb..f36aac543b 100644 --- a/src/org/thoughtcrime/securesms/PassphraseRequiredActionBarActivity.java +++ b/src/org/thoughtcrime/securesms/PassphraseRequiredActionBarActivity.java @@ -13,7 +13,7 @@ import android.support.v4.app.Fragment; import org.thoughtcrime.securesms.crypto.MasterSecretUtil; import org.thoughtcrime.securesms.jobs.PushNotificationReceiveJob; import org.thoughtcrime.securesms.logging.Log; -import org.thoughtcrime.securesms.loki.AccountDetailsActivity; +import org.thoughtcrime.securesms.loki.SeedActivity; import org.thoughtcrime.securesms.push.SignalServiceNetworkAccess; import org.thoughtcrime.securesms.registration.WelcomeActivity; import org.thoughtcrime.securesms.service.KeyCachingService; @@ -185,7 +185,7 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA } private Intent getPushRegistrationIntent() { - return getRoutedIntent(AccountDetailsActivity.class, getCreateProfileIntent()); + return getRoutedIntent(SeedActivity.class, getCreateProfileIntent()); } private Intent getCreateProfileIntent() { diff --git a/src/org/thoughtcrime/securesms/loki/AccountDetailsActivity.kt b/src/org/thoughtcrime/securesms/loki/AccountDetailsActivity.kt index 068a7950b5..0d8e581611 100644 --- a/src/org/thoughtcrime/securesms/loki/AccountDetailsActivity.kt +++ b/src/org/thoughtcrime/securesms/loki/AccountDetailsActivity.kt @@ -4,8 +4,10 @@ import android.content.Intent import android.os.Bundle import android.view.inputmethod.InputMethodManager import kotlinx.android.synthetic.main.activity_account_details.* -import network.loki.messenger.R; +import network.loki.messenger.R +import org.thoughtcrime.securesms.ApplicationContext import org.thoughtcrime.securesms.BaseActionBarActivity +import org.thoughtcrime.securesms.ConversationListActivity import org.thoughtcrime.securesms.util.TextSecurePreferences import org.whispersystems.signalservice.api.crypto.ProfileCipher @@ -29,7 +31,12 @@ class AccountDetailsActivity : BaseActionBarActivity() { } val inputMethodManager = getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager inputMethodManager.hideSoftInputFromWindow(nameEditText.windowToken, 0) - startActivity(Intent(this, SeedActivity::class.java)) + TextSecurePreferences.setHasSeenWelcomeScreen(this, true) + TextSecurePreferences.setPromptedPushRegistration(this, true) + val application = ApplicationContext.getInstance(this) + application.setUpP2PAPI() + application.startLongPollingIfNeeded() + startActivity(Intent(this, ConversationListActivity::class.java)) finish() } } \ No newline at end of file diff --git a/src/org/thoughtcrime/securesms/loki/SeedActivity.kt b/src/org/thoughtcrime/securesms/loki/SeedActivity.kt index 1522d9d2f7..c9b6f44954 100644 --- a/src/org/thoughtcrime/securesms/loki/SeedActivity.kt +++ b/src/org/thoughtcrime/securesms/loki/SeedActivity.kt @@ -10,9 +10,7 @@ import android.view.inputmethod.InputMethodManager import android.widget.Toast import kotlinx.android.synthetic.main.activity_seed.* import network.loki.messenger.R -import org.thoughtcrime.securesms.ApplicationContext import org.thoughtcrime.securesms.BaseActionBarActivity -import org.thoughtcrime.securesms.ConversationListActivity import org.thoughtcrime.securesms.crypto.IdentityKeyUtil import org.thoughtcrime.securesms.database.Address import org.thoughtcrime.securesms.database.DatabaseFactory @@ -159,15 +157,11 @@ class SeedActivity : BaseActionBarActivity() { DatabaseFactory.getIdentityDatabase(this).saveIdentity(Address.fromSerialized(hexEncodedPublicKey), publicKey, IdentityDatabase.VerifiedStatus.VERIFIED, true, System.currentTimeMillis(), true) TextSecurePreferences.setLocalNumber(this, hexEncodedPublicKey) - TextSecurePreferences.setPromptedPushRegistration(this, true) - val application = ApplicationContext.getInstance(this) - application.setUpP2PAPI() - application.startLongPollingIfNeeded() when (mode) { Mode.Register -> Analytics.shared.track("Seed Created") Mode.Restore -> Analytics.shared.track("Seed Restored") } - startActivity(Intent(this, ConversationListActivity::class.java)) + startActivity(Intent(this, AccountDetailsActivity::class.java)) finish() } // endregion diff --git a/src/org/thoughtcrime/securesms/registration/WelcomeActivity.java b/src/org/thoughtcrime/securesms/registration/WelcomeActivity.java index 1592873038..864b9c0dfa 100644 --- a/src/org/thoughtcrime/securesms/registration/WelcomeActivity.java +++ b/src/org/thoughtcrime/securesms/registration/WelcomeActivity.java @@ -8,7 +8,6 @@ import android.support.annotation.NonNull; import org.thoughtcrime.securesms.BaseActionBarActivity; import org.thoughtcrime.securesms.permissions.Permissions; import org.thoughtcrime.securesms.util.CommunicationActions; -import org.thoughtcrime.securesms.util.TextSecurePreferences; import network.loki.messenger.R; @@ -37,7 +36,7 @@ public class WelcomeActivity extends BaseActionBarActivity { .ifNecessary() .withRationaleDialog(getString(R.string.activity_landing_permission_dialog_message), R.drawable.ic_folder_white_48dp) .onAnyResult(() -> { - TextSecurePreferences.setHasSeenWelcomeScreen(WelcomeActivity.this, true); + // TextSecurePreferences.setHasSeenWelcomeScreen(WelcomeActivity.this, true); Intent nextIntent = getIntent().getParcelableExtra("next_intent");