Skip to content

Commit

Permalink
fix: return back to map after accessing detail view from the pin
Browse files Browse the repository at this point in the history
  • Loading branch information
therazix committed Jun 3, 2024
1 parent 41cfd4b commit e6f9ad9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Diary/Diary/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ private static void RegisterRoutes()
Routing.RegisterRoute("//templates/create", typeof(TemplateCreateView));

Routing.RegisterRoute("//importexport", typeof(ImportExportView));

Routing.RegisterRoute("//map/detail", typeof(EntryDetailView));
}

private static void SetupDirectories()
Expand Down
2 changes: 1 addition & 1 deletion Diary/Diary/Views/Map/MapView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ private async void OnPinClicked(object sender, PinClickedEventArgs e)
{
e.HideInfoWindow = true;
var pinModel = (PinModel)((Pin)sender).BindingContext; // Get original pin model
await Shell.Current.GoToAsync("//entries/detail", new Dictionary<string, object> { ["id"] = pinModel.EntryId });
await Shell.Current.GoToAsync("//map/detail", new Dictionary<string, object> { ["id"] = pinModel.EntryId });
}
}

0 comments on commit e6f9ad9

Please sign in to comment.