mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
Switch onboarding seed step and display name step
This commit is contained in:
parent
88dbeddb04
commit
9b2a90639d
@ -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() {
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
@ -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
|
||||
|
@ -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");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user