diff --git a/eng/AndroidX.targets b/eng/AndroidX.targets index 60626d88cc9f..f657069cda80 100644 --- a/eng/AndroidX.targets +++ b/eng/AndroidX.targets @@ -2,55 +2,55 @@ (); while (iterator.HasNext) @@ -185,7 +186,7 @@ void ApplyNavigationRequest(NavigationRequest args) // We only keep destinations around that are on the backstack // This iterates over the new backstack and removes any destinations // that are no longer apart of the back stack - var iterateNewStack = NavHost.NavController.BackStack.Iterator(); + var iterateNewStack = NavHost.NavController.BackQueue.Iterator(); int startId = -1; while (iterateNewStack.HasNext) { @@ -242,7 +243,7 @@ List Initialize(IReadOnlyList pages) var navController = NavHost.NavController; // We are subtracting one because the navgraph itself is the first item on the stack - int NativeNavigationStackCount = navController.BackStack.Size() - 1; + int NativeNavigationStackCount = navController.BackQueue.Size() - 1; // set this to one because when the graph is first attached to the controller // it will add the graph and the first destination diff --git a/src/Core/tests/DeviceTests/Handlers/Navigation/NavigationViewHandlerTests.Android.cs b/src/Core/tests/DeviceTests/Handlers/Navigation/NavigationViewHandlerTests.Android.cs index 653329fbe573..cfeac2c5979b 100644 --- a/src/Core/tests/DeviceTests/Handlers/Navigation/NavigationViewHandlerTests.Android.cs +++ b/src/Core/tests/DeviceTests/Handlers/Navigation/NavigationViewHandlerTests.Android.cs @@ -16,7 +16,7 @@ namespace Microsoft.Maui.DeviceTests public partial class NavigationViewHandlerTests { int GetNativeNavigationStackCount(NavigationViewHandler navigationViewHandler) => - navigationViewHandler.StackNavigationManager.NavHost.NavController.BackStack.Size() - 1; + navigationViewHandler.StackNavigationManager.NavHost.NavController.BackQueue.Size() - 1; Task CreateNavigationViewHandlerAsync(IStackNavigationView navigationView, Func action) { diff --git a/src/Workload/Microsoft.Maui.Sdk/Sdk/Microsoft.Maui.Sdk.After.targets b/src/Workload/Microsoft.Maui.Sdk/Sdk/Microsoft.Maui.Sdk.After.targets index 8369971b0a7f..896fde435f22 100644 --- a/src/Workload/Microsoft.Maui.Sdk/Sdk/Microsoft.Maui.Sdk.After.targets +++ b/src/Workload/Microsoft.Maui.Sdk/Sdk/Microsoft.Maui.Sdk.After.targets @@ -4,6 +4,8 @@ $(EnableDefaultMauiItems) $(EnableDefaultMauiItems) $(EnableDefaultMauiItems) + + $(MSBuildWarningsAsMessages);XA4218