Skip to content

Commit

Permalink
Merge pull request MoneyFox#3207 from NPadrutt/call-on-navigated-back…
Browse files Browse the repository at this point in the history
…-again-to-pass-parameter

Revert "prevent multiple calls of onback"
  • Loading branch information
NPadrutt authored Jan 25, 2024
2 parents b776489 + beab2dc commit cbb9b0b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Src/MoneyFox.Ui/Common/Navigation/NavigationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ internal sealed class NavigationService(Lazy<NavigationPage> lazyNavigation, IVi
public async Task GoBack(object? parameter = null)
{
await NavigationPage.PopAsync();
var view = Navigation.NavigationStack.LastOrDefault();
if (view?.BindingContext is NavigableViewModel navigableViewModel)
{
await navigableViewModel.OnNavigatedBackAsync(parameter);
}
}

public async Task NavigateFromMenuToAsync<TViewModel>() where TViewModel : NavigableViewModel
Expand Down

0 comments on commit cbb9b0b

Please sign in to comment.