Skip to content

Commit

Permalink
Fix potential bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
codemonkey85 committed Nov 22, 2024
1 parent c2111c6 commit 989f1e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
6 changes: 5 additions & 1 deletion Pkmds.Web/Components/Pages/Home.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ protected override void OnInitialized()
RefreshService.OnUpdateAvailable += ShowUpdateMessage;
}

public void Dispose() => RefreshService.OnAppStateChanged -= StateHasChanged;
public void Dispose()
{
RefreshService.OnAppStateChanged -= StateHasChanged;
RefreshService.OnUpdateAvailable -= ShowUpdateMessage;
}

public void ShowUpdateMessage()
{
Expand Down
14 changes: 7 additions & 7 deletions Pkmds.Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
});

services
.AddScoped(_ => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) })
.AddSingleton(_ => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) })
.AddFileSystemAccessService()
.AddScoped<IAppState, AppState>()
.AddScoped<IRefreshService, RefreshService>()
.AddScoped<IAppService, AppService>()
.AddScoped<JsService>()
.AddScoped<BlazorAesProvider>()
.AddScoped<BlazorMd5Provider>();
.AddSingleton<IAppState, AppState>()
.AddSingleton<IRefreshService, RefreshService>()
.AddSingleton<IAppService, AppService>()
.AddSingleton<JsService>()
.AddSingleton<BlazorAesProvider>()
.AddSingleton<BlazorMd5Provider>();

var app = builder.Build();

Expand Down

0 comments on commit 989f1e8

Please sign in to comment.