]> git.ktnx.net Git - mobile-ledger.git/commitdiff
when saving a pattern, use the navigateUp() method
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 30 Jan 2021 11:57:11 +0000 (11:57 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 30 Jan 2021 11:57:11 +0000 (11:57 +0000)
this leaves the navigation stack in a better state

app/src/main/java/net/ktnx/mobileledger/ui/patterns/PatternsActivity.java

index c9a41280f2049f9351325a87a76d2603d3c1f857..ad8c23642ff43afd4715621e5e01c6d8b8a70132 100644 (file)
@@ -104,7 +104,7 @@ public class PatternsActivity extends CrashReportingActivity
                 new ViewModelProvider(viewModelStoreOwner).get(PatternDetailsViewModel.class);
         Logger.debug("flow", "PatternsActivity.onSavePattern(): model=" + model);
         model.onSavePattern();
-        navController.navigate(R.id.patternListFragment);
+        navController.navigateUp();
     }
     public NavController getNavController() {
         return navController;