Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(EWM-343): skip redirect for direct subroute navigation #568

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/app/router/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ class AppRouter {

// Get root app route
final rootAppRoute = getRootAppRoute(fullPath: fullPath);
final segments = AppRoute.pathSegments(fullPath: fullPath);
final isSubroute = segments.length > 1;

// Get saved subroute for the root app route (if any)
final savedSubroute = _savedSubroutes[rootAppRoute];
Expand Down Expand Up @@ -103,7 +105,8 @@ class AppRouter {
// navigates to another root app route and returns back to the previous
// root app route using bottom tab bar. In this case, the subroute
// should be restored.
if (rootAppRouteChaned && savedSubroute != null) {
// Skip subroute restoration if navigatad directry to subrout.
if (rootAppRouteChaned && !isSubroute && savedSubroute != null) {
return savedSubroute;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ class SelectAccountWidgetModel

void onManageSeedsAndAccounts() {
Navigator.of(context).pop();
context
..goNamed(AppRoute.profile.name)
..goFurther(AppRoute.manageSeedsAccounts.path);
context.goNamed(AppRoute.manageSeedsAccounts.name);
}

ListenableState<Money> getBalanceEntity(KeyAccount account) {
Expand Down
Loading