about summary refs log tree commit diff
path: root/MatrixUtils.Web/Pages/InvalidSession.razor
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-01-24 02:31:56 +0100
committerRory& <root@rory.gay>2024-01-24 17:05:25 +0100
commit03313562d21d5db9bf6a14ebbeab80e06c883d3a (patch)
treee000546a2ee8e6a886a7ed9fd01ad674178fb7cb /MatrixUtils.Web/Pages/InvalidSession.razor
parentMake RMU installable (diff)
downloadMatrixUtils-03313562d21d5db9bf6a14ebbeab80e06c883d3a.tar.xz
MRU->RMU, fixes, cleanup
Diffstat (limited to '')
-rw-r--r--MatrixUtils.Web/Pages/InvalidSession.razor (renamed from MatrixRoomUtils.Web/Pages/InvalidSession.razor)16
1 files changed, 8 insertions, 8 deletions
diff --git a/MatrixRoomUtils.Web/Pages/InvalidSession.razor b/MatrixUtils.Web/Pages/InvalidSession.razor

index 7d4769c..e1a72ea 100644 --- a/MatrixRoomUtils.Web/Pages/InvalidSession.razor +++ b/MatrixUtils.Web/Pages/InvalidSession.razor
@@ -40,7 +40,7 @@ else { private MatrixException? _loginException { get; set; } protected override async Task OnInitializedAsync() { - var tokens = await MRUStorage.GetAllTokens(); + var tokens = await RMUStorage.GetAllTokens(); if (tokens is null || tokens.Count == 0) { NavigationManager.NavigateTo("/Login"); return; @@ -56,9 +56,9 @@ else { } private async Task RemoveUser() { - await MRUStorage.RemoveToken(_login!); - if ((await MRUStorage.GetCurrentToken())!.AccessToken == _login!.AccessToken) - await MRUStorage.SetCurrentToken((await MRUStorage.GetAllTokens())?.FirstOrDefault()); + await RMUStorage.RemoveToken(_login!); + if ((await RMUStorage.GetCurrentToken())!.AccessToken == _login!.AccessToken) + await RMUStorage.SetCurrentToken((await RMUStorage.GetAllTokens())?.FirstOrDefault()); await OnInitializedAsync(); } @@ -70,7 +70,7 @@ else { private async Task SwitchSession(UserAuth auth) { Console.WriteLine($"Switching to {auth.Homeserver} {auth.AccessToken} {auth.UserId}"); - await MRUStorage.SetCurrentToken(auth); + await RMUStorage.SetCurrentToken(auth); await OnInitializedAsync(); } @@ -85,9 +85,9 @@ else { Console.WriteLine($"Obtained access token for {result.UserId}!"); await RemoveUser(); - await MRUStorage.AddToken(result); - if (result.UserId == (await MRUStorage.GetCurrentToken())?.UserId) - await MRUStorage.SetCurrentToken(result); + await RMUStorage.AddToken(result); + if (result.UserId == (await RMUStorage.GetCurrentToken())?.UserId) + await RMUStorage.SetCurrentToken(result); NavigationManager.NavigateTo("/"); } catch (MatrixException e) {