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 e6329cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Diary/Diary/MauiProgram.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ private static void RegisterRoutes()
Routing.RegisterRoute("//templates/create", typeof(TemplateCreateView));

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

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

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 e6329cb

Please sign in to comment.