From b02fb81a56bd94b38fdb26771c3e591419f0f49c Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Wed, 3 May 2023 20:42:20 +0200 Subject: Small refactoring --- MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'MatrixRoomUtils.Web/Classes') diff --git a/MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs b/MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs index 462364c..229d937 100644 --- a/MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs +++ b/MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs @@ -1,12 +1,15 @@ using Blazored.LocalStorage; -using MatrixRoomUtils.Authentication; -using MatrixRoomUtils.Responses; namespace MatrixRoomUtils.Web.Classes; public partial class LocalStorageWrapper { //some basic logic + public static async Task ReloadLocalStorage(ILocalStorageService localStorage) + { + await LoadFromLocalStorage(localStorage); + await SaveToLocalStorage(localStorage); + } public static async Task LoadFromLocalStorage(ILocalStorageService localStorage) { RuntimeCache.AccessToken = await localStorage.GetItemAsync("rory.matrixroomutils.token"); -- cgit 1.5.1