diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-12-14 19:08:22 +0000 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-12-14 19:08:22 +0000 |
commit | 46f6d337c765f1f8a91b9422f487c32d5e1cf56b (patch) | |
tree | 59e69e21ff1016d27ba8a23fb01435fa27ca9ed1 /MatrixRoomUtils.Web/Shared/MxcImage.razor | |
parent | Cleanup (diff) | |
download | MatrixUtils-46f6d337c765f1f8a91b9422f487c32d5e1cf56b.tar.xz |
Small changes
Diffstat (limited to 'MatrixRoomUtils.Web/Shared/MxcImage.razor')
-rw-r--r-- | MatrixRoomUtils.Web/Shared/MxcImage.razor | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/MatrixRoomUtils.Web/Shared/MxcImage.razor b/MatrixRoomUtils.Web/Shared/MxcImage.razor index f54c1f8..fb8c248 100644 --- a/MatrixRoomUtils.Web/Shared/MxcImage.razor +++ b/MatrixRoomUtils.Web/Shared/MxcImage.razor @@ -8,11 +8,15 @@ public string MxcUri { get => _mxcUri ?? ""; set { + Console.WriteLine($"New MXC uri: {value}"); _mxcUri = value; UriHasChanged(value); } } + //mxcuri binding + + [Parameter] public string Style { get => _style; @@ -34,7 +38,13 @@ private async Task UriHasChanged(string value) { var uri = value[5..].Split('/'); - ResolvedUri = (Homeserver ?? await hsProvider.GetRemoteHomeserver(uri[0])).ResolveMediaUri(value); + Console.WriteLine($"UriHasChanged: {value} {uri[0]}"); + if (Homeserver is null) { + Console.WriteLine($"Homeserver is null, creating new remotehomeserver for {uri[0]}"); + Homeserver = await hsProvider.GetRemoteHomeserver(uri[0]); + } + ResolvedUri = Homeserver.ResolveMediaUri(value); + Console.WriteLine($"ResolvedUri: {ResolvedUri}"); } [Parameter] |