diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-19 02:36:32 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-06-19 02:36:32 +0200 |
commit | ed2205972a7b7d6fdd4563c3775a83616920597a (patch) | |
tree | 54aec1cfdf861fd8a7739be131fbe79ae24d91e4 /MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs | |
parent | Partial refactor (diff) | |
download | MatrixUtils-ed2205972a7b7d6fdd4563c3775a83616920597a.tar.xz |
Working sync
Diffstat (limited to 'MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs')
-rw-r--r-- | MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs b/MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs index b7da78a..878eca4 100644 --- a/MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs +++ b/MatrixRoomUtils.Web/Classes/LocalStorageWrapper.cs @@ -10,19 +10,18 @@ public class LocalStorageWrapper { //some basic logic public static async Task InitialiseRuntimeVariables(ILocalStorageService localStorage) { //RuntimeCache stuff - async Task Save() => await SaveToLocalStorage(localStorage); - async Task SaveObject(string key, object obj) => await localStorage.SetItemAsync(key, obj); - async Task RemoveObject(string key) => await localStorage.RemoveItemAsync(key); - - RuntimeCache.Save = Save; - RuntimeCache.SaveObject = SaveObject; - RuntimeCache.RemoveObject = RemoveObject; + // async Task Save() => await SaveToLocalStorage(localStorage); + // async Task SaveObject(string key, object obj) => await localStorage.SetItemAsync(key, obj); + // async Task RemoveObject(string key) => await localStorage.RemoveItemAsync(key); + // + // RuntimeCache.Save = Save; + // RuntimeCache.SaveObject = SaveObject; + // RuntimeCache.RemoveObject = RemoveObject; if (RuntimeCache.LastUsedToken != null) { Console.WriteLine("Access token is not null, creating authenticated home server"); Console.WriteLine($"Homeserver cache: {RuntimeCache.HomeserverResolutionCache.Count} entries"); // Console.WriteLine(RuntimeCache.HomeserverResolutionCache.ToJson()); - RuntimeCache.CurrentHomeServer = await new AuthenticatedHomeServer(RuntimeCache.LoginSessions[RuntimeCache.LastUsedToken].LoginResponse.UserId, RuntimeCache.LastUsedToken, - RuntimeCache.LoginSessions[RuntimeCache.LastUsedToken].LoginResponse.HomeServer).Configure(); + RuntimeCache.CurrentHomeServer = await new AuthenticatedHomeServer(RuntimeCache.LoginSessions[RuntimeCache.LastUsedToken].LoginResponse.HomeServer, RuntimeCache.LastUsedToken, TODO).Configure(); Console.WriteLine("Created authenticated home server"); } } |