Skip to content

Commit

Permalink
feat: block navigation where old page equals to new page
Browse files Browse the repository at this point in the history
  • Loading branch information
Stéphane ANDRE (E104915) committed Aug 18, 2024
1 parent 28f95bc commit a8a0e95
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ public virtual void OnNavigatingFrom(NavigatingContext navigatingContext) { }

protected virtual bool CanRefreshOnNavigatedTo(NavigationContext navigationContext) => false;

protected virtual bool CanNavigateTo(NavigatingContext navigatingContext) => true;
protected virtual bool CanNavigateTo(NavigatingContext navigatingContext) => navigatingContext.OldPage is null || navigatingContext.OldPage != navigatingContext.Page || (!navigatingContext.Parameters?.Equals(NavigationService.CurrentContext) ?? false);
}
}

0 comments on commit a8a0e95

Please sign in to comment.