Skip to content

Commit

Permalink
2.0.57 - Fixes #265 correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
adospace committed Dec 1, 2024
1 parent d422068 commit 5462726
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
Solution_Name: ./src/MauiReactor.Build.sln
Test_Project: ./samples/UnitTests/UnitTests.csproj
TemplatePack_Name: ./src/MauiReactor.TemplatePack/MauiReactor.TemplatePack.csproj
Version: 2.0.56
Version: 2.0.57

steps:
- name: Checkout
Expand Down
14 changes: 12 additions & 2 deletions src/MauiReactor/ContentPage.partial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,18 @@ partial class ContentPageWithBackButtonPressedOverriden : Microsoft.Maui.Control
{
protected override bool OnBackButtonPressed()
{
//we want to handle back button pressed event (including physical button on Android)
return true;
var backButtonBehavior = (BackButtonBehavior?)this.GetValue(Microsoft.Maui.Controls.Shell.BackButtonBehaviorProperty);

if (backButtonBehavior != null &&
backButtonBehavior.Command != null &&
backButtonBehavior.Command.CanExecute(null))
{
//we want to handle back button pressed event (including physical button on Android)
backButtonBehavior.Command.Execute(null);
return true;
}

return false;
}
}

Expand Down

0 comments on commit 5462726

Please sign in to comment.