diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/loadaccount/LoadAccountActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/loadaccount/LoadAccountActivity.kt index 90c957c128..c4a11d9f37 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/loadaccount/LoadAccountActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/loadaccount/LoadAccountActivity.kt @@ -12,8 +12,9 @@ import network.loki.messenger.R import org.session.libsession.utilities.TextSecurePreferences import org.thoughtcrime.securesms.BaseActionBarActivity import org.thoughtcrime.securesms.onboarding.loading.LoadingManager -import org.thoughtcrime.securesms.onboarding.messagenotifications.startMessageNotificationsActivity +import org.thoughtcrime.securesms.onboarding.messagenotifications.MessageNotificationsActivity import org.thoughtcrime.securesms.ui.setComposeContent +import org.thoughtcrime.securesms.util.start import javax.inject.Inject @AndroidEntryPoint @@ -38,8 +39,7 @@ class LoadAccountActivity : BaseActionBarActivity() { lifecycleScope.launch { viewModel.events.collect { loadingManager.load(it.mnemonic) - startMessageNotificationsActivity() - finish() + start() } } diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotificationsActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotificationsActivity.kt index 469fafa2b2..2deb38ef5c 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotificationsActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/messagenotifications/MessageNotificationsActivity.kt @@ -31,7 +31,7 @@ class MessageNotificationsActivity : BaseActionBarActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - setUpActionBarSessionLogo(true) + setUpActionBarSessionLogo() prefs.setHasSeenWelcomeScreen(true) setComposeContent { MessageNotificationsScreen() } @@ -54,9 +54,3 @@ class MessageNotificationsActivity : BaseActionBarActivity() { } } } - -fun Context.startMessageNotificationsActivity(flags: Int = 0) { - Intent(this, MessageNotificationsActivity::class.java) - .also { it.flags = flags } - .also(::startActivity) -} diff --git a/app/src/main/java/org/thoughtcrime/securesms/onboarding/pickname/PickDisplayNameActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/onboarding/pickname/PickDisplayNameActivity.kt index 4be83c5380..a0c2e01fb6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/onboarding/pickname/PickDisplayNameActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/onboarding/pickname/PickDisplayNameActivity.kt @@ -13,9 +13,10 @@ import org.session.libsession.utilities.TextSecurePreferences import org.thoughtcrime.securesms.ApplicationContext import org.thoughtcrime.securesms.BaseActionBarActivity import org.thoughtcrime.securesms.home.startHomeActivity -import org.thoughtcrime.securesms.onboarding.messagenotifications.startMessageNotificationsActivity +import org.thoughtcrime.securesms.onboarding.messagenotifications.MessageNotificationsActivity import org.thoughtcrime.securesms.ui.setComposeContent import org.thoughtcrime.securesms.util.setUpActionBarSessionLogo +import org.thoughtcrime.securesms.util.start import javax.inject.Inject private const val EXTRA_LOAD_FAILED = "extra_load_failed" @@ -44,7 +45,7 @@ class PickDisplayNameActivity : BaseActionBarActivity() { lifecycleScope.launch { viewModel.events.collect { - if (loadFailed) startHomeActivity() else startMessageNotificationsActivity() + if (loadFailed) startHomeActivity() else start() } } }