about summary refs log tree commit diff
path: root/MatrixRoomUtils.Desktop/MRUStorageWrapper.cs
diff options
context:
space:
mode:
authorEmma@Rory& <root@rory.gay>2023-07-26 21:02:50 +0200
committerEmma@Rory& <root@rory.gay>2023-07-26 21:02:50 +0200
commit2e89a0717a60598904c92499adb7e01b2075fbb9 (patch)
tree56b9b7f07180154d9d98dafa91d7c16a0a872100 /MatrixRoomUtils.Desktop/MRUStorageWrapper.cs
parentStart of nix flake (diff)
downloadMatrixUtils-2e89a0717a60598904c92499adb7e01b2075fbb9.tar.xz
MRU desktop start
Diffstat (limited to 'MatrixRoomUtils.Desktop/MRUStorageWrapper.cs')
-rw-r--r--MatrixRoomUtils.Desktop/MRUStorageWrapper.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/MatrixRoomUtils.Desktop/MRUStorageWrapper.cs b/MatrixRoomUtils.Desktop/MRUStorageWrapper.cs

index 27403dc..a5494ad 100644 --- a/MatrixRoomUtils.Desktop/MRUStorageWrapper.cs +++ b/MatrixRoomUtils.Desktop/MRUStorageWrapper.cs
@@ -54,6 +54,8 @@ public class MRUStorageWrapper { tokens.Add(loginResponse); await _storageService.DataStorageProvider.SaveObjectAsync("mru.tokens", tokens); + if(await GetCurrentToken() is null) + await SetCurrentToken(loginResponse); } private async Task<AuthenticatedHomeServer?> GetCurrentSession() { @@ -85,7 +87,7 @@ public class MRUStorageWrapper { if (session is null) { // _navigationManager.NavigateTo("/Login"); var wnd = new LoginWindow(this); - wnd.Show(); + wnd.ShowDialog(MainWindow.Instance); while (wnd.IsVisible) await Task.Delay(100); session = await GetCurrentSession(); }