From 8d8a2a8eef1311221fd88bd41412f7d590e039bd Mon Sep 17 00:00:00 2001 From: Cody Henthorne Date: Mon, 28 Feb 2022 12:02:51 -0500 Subject: [PATCH] Fix navigation crash in welcome fragment. --- .../securesms/registration/fragments/WelcomeFragment.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/registration/fragments/WelcomeFragment.java b/app/src/main/java/org/thoughtcrime/securesms/registration/fragments/WelcomeFragment.java index 4c5a119e5d..28b3c1f2a2 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/registration/fragments/WelcomeFragment.java +++ b/app/src/main/java/org/thoughtcrime/securesms/registration/fragments/WelcomeFragment.java @@ -102,7 +102,7 @@ public final class WelcomeFragment extends LoggingFragment { Log.i(TAG, "Skipping restore because this is a reregistration."); viewModel.setWelcomeSkippedOnRestore(); - SafeNavigation.safeNavigate(Navigation.findNavController(view), + SafeNavigation.safeNavigate(NavHostFragment.findNavController(this), WelcomeFragmentDirections.actionSkipRestore()); } else { @@ -180,10 +180,10 @@ public final class WelcomeFragment extends LoggingFragment { if (backup == null) { Log.i(TAG, "Skipping backup. No backup found, or no permission to look."); - SafeNavigation.safeNavigate(Navigation.findNavController(view), + SafeNavigation.safeNavigate(NavHostFragment.findNavController(this), WelcomeFragmentDirections.actionSkipRestore()); } else { - SafeNavigation.safeNavigate(Navigation.findNavController(view), + SafeNavigation.safeNavigate(NavHostFragment.findNavController(this), WelcomeFragmentDirections.actionRestore()); } }); @@ -194,7 +194,7 @@ public final class WelcomeFragment extends LoggingFragment { initializeNumber(); - SafeNavigation.safeNavigate(Navigation.findNavController(view), + SafeNavigation.safeNavigate(NavHostFragment.findNavController(this), WelcomeFragmentDirections.actionTransferOrRestore()); }