diff options
Diffstat (limited to '')
-rw-r--r-- | MatrixRoomUtils.Web/_Imports.razor | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/MatrixRoomUtils.Web/_Imports.razor b/MatrixRoomUtils.Web/_Imports.razor index c675706..dd81444 100644 --- a/MatrixRoomUtils.Web/_Imports.razor +++ b/MatrixRoomUtils.Web/_Imports.razor @@ -1,5 +1,6 @@ @using System.Net.Http @using System.Net.Http.Json +@using Blazored.LocalStorage @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Web @@ -7,4 +8,21 @@ @using Microsoft.AspNetCore.Components.WebAssembly.Http @using Microsoft.JSInterop @using MatrixRoomUtils.Web -@using MatrixRoomUtils.Web.Shared \ No newline at end of file +@using MatrixRoomUtils.Web.Classes +@using MatrixRoomUtils.Web.Shared + +@inject ILocalStorageService LocalStorage + +@code +{ + + protected override async Task OnInitializedAsync() + { + if (!RuntimeCache.WasLoaded) + { + await LocalStorageWrapper.LoadFromLocalStorage(LocalStorage); + Console.WriteLine("Loaded from local storage"); + StateHasChanged(); + } + } +} |