diff --git a/TransactionProcessor.Mobile/Extensions/MauiAppBuilderExtensions.cs b/TransactionProcessor.Mobile/Extensions/MauiAppBuilderExtensions.cs index 0614b56d..cf794de8 100644 --- a/TransactionProcessor.Mobile/Extensions/MauiAppBuilderExtensions.cs +++ b/TransactionProcessor.Mobile/Extensions/MauiAppBuilderExtensions.cs @@ -176,8 +176,6 @@ public static HttpMessageHandler GetHandler() { public static MauiAppBuilder ConfigureUIServices(this MauiAppBuilder builder) { builder.Services.AddSingleton(); - builder.Services.AddTransient>(serviceProvider => - () => serviceProvider.GetRequiredService()); builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); diff --git a/TransactionProcessor.Mobile/UIServices/ShellNavigationService.cs b/TransactionProcessor.Mobile/UIServices/ShellNavigationService.cs index 0252ea53..c3317ce9 100644 --- a/TransactionProcessor.Mobile/UIServices/ShellNavigationService.cs +++ b/TransactionProcessor.Mobile/UIServices/ShellNavigationService.cs @@ -14,14 +14,11 @@ namespace TransactionProcessor.Mobile.UIServices; public class ShellNavigationService : INavigationService { private readonly INavigationParameterService NavigationParameterService; - private readonly Func MyAccountAddressesPageFactory; #region Methods - public ShellNavigationService(INavigationParameterService navigationParameterService, - Func myAccountAddressesPageFactory) { + public ShellNavigationService(INavigationParameterService navigationParameterService) { this.NavigationParameterService = navigationParameterService; - this.MyAccountAddressesPageFactory = myAccountAddressesPageFactory; } public async Task QuitApplication(){ @@ -175,8 +172,7 @@ public async Task GoToViewLogsPage() { } public async Task GoToMyAccountAddresses() { - MyAccountAddressesPage p = this.MyAccountAddressesPageFactory(); - await this.NavigateTo(p); + await this.NavigateTo(nameof(MyAccountAddressesPage)); } public async Task GoToMyAccountContacts() {