Fix navigation crash in welcome fragment.

This commit is contained in:
Cody Henthorne
2022-02-28 12:02:51 -05:00
committed by Alex Hart
parent 277c17de83
commit 8d8a2a8eef

View File

@@ -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());
}