about summary refs log tree commit diff
path: root/MatrixRoomUtils.Web/_Imports.razor
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2023-05-03 20:42:20 +0200
committerTheArcaneBrony <myrainbowdash949@gmail.com>2023-05-03 20:42:20 +0200
commitb02fb81a56bd94b38fdb26771c3e591419f0f49c (patch)
tree617538d36ff9be9ba0f5d13cb6076b02f017a91b /MatrixRoomUtils.Web/_Imports.razor
parentRefactor (diff)
downloadMatrixUtils-b02fb81a56bd94b38fdb26771c3e591419f0f49c.tar.xz
Small refactoring
Diffstat (limited to 'MatrixRoomUtils.Web/_Imports.razor')
-rw-r--r--MatrixRoomUtils.Web/_Imports.razor20
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();
+        }
+    }
+}