mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-07-09 15:34:27 +01:00
Simplify reg v2 nav graph names.
This commit is contained in:
+1
-1
@@ -516,7 +516,7 @@ class EnterPhoneNumberFragment : LoggingFragment(R.layout.fragment_registration_
|
||||
}
|
||||
|
||||
private fun moveToEnterPinScreen() {
|
||||
findNavController().safeNavigate(EnterPhoneNumberFragmentDirections.actionReRegisterWithPinV2Fragment())
|
||||
findNavController().safeNavigate(EnterPhoneNumberFragmentDirections.actionReRegisterWithPinFragment())
|
||||
sharedViewModel.setInProgress(false)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -83,7 +83,7 @@ class ReRegisterWithPinFragment : LoggingFragment(R.layout.fragment_registration
|
||||
if (state.networkError != null) {
|
||||
genericErrorDialog()
|
||||
} else if (!state.canSkipSms) {
|
||||
findNavController().safeNavigate(ReRegisterWithPinFragmentDirections.actionReRegisterWithPinFragmentToEnterPhoneNumberV2Fragment())
|
||||
findNavController().safeNavigate(ReRegisterWithPinFragmentDirections.actionReRegisterWithPinFragmentToEnterPhoneNumberFragment())
|
||||
} else if (state.isRegistrationLockEnabled && state.svrTriesRemaining == 0) {
|
||||
Log.w(TAG, "Unable to continue skip flow, KBS is locked")
|
||||
onAccountLocked()
|
||||
@@ -263,7 +263,7 @@ class ReRegisterWithPinFragment : LoggingFragment(R.layout.fragment_registration
|
||||
|
||||
is RegisterAccountResult.IncorrectRecoveryPassword -> {
|
||||
registrationViewModel.setUserSkippedReRegisterFlow(true)
|
||||
findNavController().safeNavigate(ReRegisterWithPinFragmentDirections.actionReRegisterWithPinFragmentToEnterPhoneNumberV2Fragment())
|
||||
findNavController().safeNavigate(ReRegisterWithPinFragmentDirections.actionReRegisterWithPinFragmentToEnterPhoneNumberFragment())
|
||||
}
|
||||
|
||||
is RegisterAccountResult.AttemptsExhausted,
|
||||
|
||||
+2
-2
@@ -67,7 +67,7 @@ class WelcomeFragment : LoggingFragment(R.layout.fragment_registration_welcome)
|
||||
private fun onContinueClicked() {
|
||||
TextSecurePreferences.setHasSeenWelcomeScreen(requireContext(), true)
|
||||
if (Permissions.isRuntimePermissionsRequired() && !hasAllPermissions()) {
|
||||
findNavController().safeNavigate(WelcomeFragmentDirections.actionWelcomeFragmentToGrantPermissionsV2Fragment(GrantPermissionsFragment.WelcomeAction.CONTINUE))
|
||||
findNavController().safeNavigate(WelcomeFragmentDirections.actionWelcomeFragmentToGrantPermissionsFragment(GrantPermissionsFragment.WelcomeAction.CONTINUE))
|
||||
} else {
|
||||
sharedViewModel.maybePrefillE164(requireContext())
|
||||
findNavController().safeNavigate(WelcomeFragmentDirections.actionSkipRestore())
|
||||
@@ -85,7 +85,7 @@ class WelcomeFragment : LoggingFragment(R.layout.fragment_registration_welcome)
|
||||
|
||||
private fun onTransferOrRestoreClicked() {
|
||||
if (Permissions.isRuntimePermissionsRequired() && !hasAllPermissions()) {
|
||||
findNavController().safeNavigate(WelcomeFragmentDirections.actionWelcomeFragmentToGrantPermissionsV2Fragment(GrantPermissionsFragment.WelcomeAction.RESTORE_BACKUP))
|
||||
findNavController().safeNavigate(WelcomeFragmentDirections.actionWelcomeFragmentToGrantPermissionsFragment(GrantPermissionsFragment.WelcomeAction.RESTORE_BACKUP))
|
||||
} else {
|
||||
sharedViewModel.setRegistrationCheckpoint(RegistrationCheckpoint.PERMISSIONS_GRANTED)
|
||||
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/signup_v2"
|
||||
app:startDestination="@id/welcomeV2Fragment">
|
||||
android:id="@+id/signup"
|
||||
app:startDestination="@id/welcomeFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/welcomeV2Fragment"
|
||||
android:id="@+id/welcomeFragment"
|
||||
android:name="org.thoughtcrime.securesms.registration.ui.welcome.WelcomeFragment"
|
||||
android:label="fragment_welcome"
|
||||
tools:layout="@layout/fragment_registration_welcome">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_skip_restore"
|
||||
app:destination="@id/enterPhoneNumberV2Fragment"
|
||||
app:destination="@id/enterPhoneNumberFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
@@ -21,15 +21,15 @@
|
||||
|
||||
<action
|
||||
android:id="@+id/action_go_to_registration"
|
||||
app:destination="@id/enterPhoneNumberV2Fragment"
|
||||
app:destination="@id/enterPhoneNumberFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_welcomeFragment_to_grantPermissionsV2Fragment"
|
||||
app:destination="@id/grantPermissionsV2Fragment"
|
||||
android:id="@+id/action_welcomeFragment_to_grantPermissionsFragment"
|
||||
app:destination="@id/grantPermissionsFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
@@ -38,14 +38,14 @@
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/grantPermissionsV2Fragment"
|
||||
android:id="@+id/grantPermissionsFragment"
|
||||
android:name="org.thoughtcrime.securesms.registration.ui.grantpermissions.GrantPermissionsFragment"
|
||||
android:label="fragment_grant_permissions">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_enter_phone_number"
|
||||
app:destination="@id/enterPhoneNumberV2Fragment"
|
||||
app:popUpTo="@+id/welcomeV2Fragment"
|
||||
app:destination="@id/enterPhoneNumberFragment"
|
||||
app:popUpTo="@+id/welcomeFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
@@ -58,14 +58,14 @@
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/enterPhoneNumberV2Fragment"
|
||||
android:id="@+id/enterPhoneNumberFragment"
|
||||
android:name="org.thoughtcrime.securesms.registration.ui.phonenumber.EnterPhoneNumberFragment"
|
||||
android:label="fragment_enter_phone_number"
|
||||
tools:layout="@layout/fragment_registration_enter_phone_number">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_enterVerificationCode"
|
||||
app:destination="@id/enterCodeV2Fragment"
|
||||
app:destination="@id/enterCodeFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
<action
|
||||
android:id="@+id/action_requestCaptcha"
|
||||
app:destination="@id/captchaV2Fragment"
|
||||
app:destination="@id/captchaFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
@@ -81,49 +81,49 @@
|
||||
|
||||
<action
|
||||
android:id="@+id/action_editProxy"
|
||||
app:destination="@+id/registrationProxyV2Fragment"
|
||||
app:destination="@+id/registrationProxyFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_reRegisterWithPinV2Fragment"
|
||||
app:destination="@id/reRegisterWithPinV2Fragment"
|
||||
android:id="@+id/action_reRegisterWithPinFragment"
|
||||
app:destination="@id/reRegisterWithPinFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:popUpTo="@id/enterPhoneNumberV2Fragment"
|
||||
app:popUpTo="@id/enterPhoneNumberFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/countryPickerV2Fragment"
|
||||
android:id="@+id/countryPickerFragment"
|
||||
android:name="org.thoughtcrime.securesms.registration.fragments.CountryPickerFragment"
|
||||
android:label="fragment_country_picker"
|
||||
tools:layout="@layout/fragment_registration_country_picker" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/enterCodeV2Fragment"
|
||||
android:id="@+id/enterCodeFragment"
|
||||
android:name="org.thoughtcrime.securesms.registration.ui.entercode.EnterCodeFragment"
|
||||
android:label="fragment_enter_code"
|
||||
tools:layout="@layout/fragment_registration_enter_code">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_requireKbsLockPin"
|
||||
app:destination="@id/registrationLockV2Fragment"
|
||||
app:destination="@id/registrationLockFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:popUpTo="@+id/welcomeV2Fragment"
|
||||
app:popUpTo="@+id/welcomeFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_requestCaptcha"
|
||||
app:destination="@id/captchaV2Fragment"
|
||||
app:destination="@id/captchaFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
@@ -131,30 +131,30 @@
|
||||
|
||||
<action
|
||||
android:id="@+id/action_accountLocked"
|
||||
app:destination="@id/accountLockedV2Fragment"
|
||||
app:destination="@id/accountLockedFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:popUpTo="@+id/welcomeV2Fragment"
|
||||
app:popUpTo="@+id/welcomeFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/registrationLockV2Fragment"
|
||||
android:id="@+id/registrationLockFragment"
|
||||
android:name="org.thoughtcrime.securesms.registration.ui.registrationlock.RegistrationLockFragment"
|
||||
android:label="fragment_kbs_lock"
|
||||
tools:layout="@layout/fragment_registration_lock">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_accountLocked"
|
||||
app:destination="@id/accountLockedV2Fragment"
|
||||
app:destination="@id/accountLockedFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:popUpTo="@+id/welcomeV2Fragment"
|
||||
app:popUpTo="@+id/welcomeFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
<argument
|
||||
@@ -164,49 +164,49 @@
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/reRegisterWithPinV2Fragment"
|
||||
android:id="@+id/reRegisterWithPinFragment"
|
||||
android:name="org.thoughtcrime.securesms.registration.ui.reregisterwithpin.ReRegisterWithPinFragment"
|
||||
tools:layout="@layout/fragment_registration_lock">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_reRegisterWithPinFragment_to_enterPhoneNumberV2Fragment"
|
||||
app:destination="@id/enterPhoneNumberV2Fragment"
|
||||
android:id="@+id/action_reRegisterWithPinFragment_to_enterPhoneNumberFragment"
|
||||
app:destination="@id/enterPhoneNumberFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:popUpTo="@+id/reRegisterWithPinV2Fragment"
|
||||
app:popUpTo="@+id/reRegisterWithPinFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/accountLockedV2Fragment"
|
||||
android:id="@+id/accountLockedFragment"
|
||||
android:name="org.thoughtcrime.securesms.registration.ui.accountlocked.AccountLockedFragment"
|
||||
android:label="fragment_account_locked"
|
||||
tools:layout="@layout/account_locked_fragment" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/captchaV2Fragment"
|
||||
android:id="@+id/captchaFragment"
|
||||
android:name="org.thoughtcrime.securesms.registration.ui.captcha.RegistrationCaptchaFragment"
|
||||
android:label="fragment_captcha"
|
||||
tools:layout="@layout/fragment_registration_captcha" />
|
||||
|
||||
|
||||
<fragment
|
||||
android:id="@+id/registrationProxyV2Fragment"
|
||||
android:id="@+id/registrationProxyFragment"
|
||||
android:name="org.thoughtcrime.securesms.preferences.EditProxyFragment"
|
||||
android:label="fragment_registration_edit_proxy"
|
||||
tools:layout="@layout/edit_proxy_fragment" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_restart_to_welcomeV2Fragment"
|
||||
app:destination="@id/welcomeV2Fragment"
|
||||
android:id="@+id/action_restart_to_welcomeFragment"
|
||||
app:destination="@id/welcomeFragment"
|
||||
app:enterAnim="@anim/nav_default_enter_anim"
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:popUpTo="@id/welcomeV2Fragment"
|
||||
app:popUpTo="@id/welcomeFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
|
||||
</navigation>
|
||||
@@ -153,7 +153,7 @@
|
||||
app:exitAnim="@anim/nav_default_exit_anim"
|
||||
app:popEnterAnim="@anim/nav_default_pop_enter_anim"
|
||||
app:popExitAnim="@anim/nav_default_pop_exit_anim"
|
||||
app:popUpTo="@id/welcomeV2Fragment" />
|
||||
app:popUpTo="@id/welcomeFragment" />
|
||||
|
||||
</fragment>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user