diff options
author | Rory& <root@rory.gay> | 2024-07-02 02:00:43 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-07-02 02:00:43 +0200 |
commit | cb038a49c417813bbb09f770e49aa28169a83710 (patch) | |
tree | f16944061c8ba7a8714607fd269875d71ea18e41 /MatrixUtils.Desktop/Components/RoomListEntry.axaml.cs | |
parent | Some cleanup, update libs (diff) | |
download | MatrixUtils-main.tar.xz |
Authenticated media foundations HEAD github/main main
Diffstat (limited to 'MatrixUtils.Desktop/Components/RoomListEntry.axaml.cs')
-rw-r--r-- | MatrixUtils.Desktop/Components/RoomListEntry.axaml.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/MatrixUtils.Desktop/Components/RoomListEntry.axaml.cs b/MatrixUtils.Desktop/Components/RoomListEntry.axaml.cs index 1e4a127..1e6b99f 100644 --- a/MatrixUtils.Desktop/Components/RoomListEntry.axaml.cs +++ b/MatrixUtils.Desktop/Components/RoomListEntry.axaml.cs @@ -44,7 +44,7 @@ public partial class RoomListEntry : UserControl { var avatarEvent = await Room.GetStateEvent("m.room.avatar"); if (avatarEvent?.TypedContent is RoomAvatarEventContent avatarData) { var mxcUrl = avatarData.Url; - var resolvedUrl = await Room.Room.GetResolvedRoomAvatarUrlAsync(); + var resolvedUrl = await Room.Room.GetAvatarUrlAsync(); // await using var svc = _serviceScopeFactory.CreateAsyncScope(); // var hs = await svc.ServiceProvider.GetService<RMUStorageWrapper>()?.GetCurrentSessionOrPrompt()!; @@ -54,10 +54,10 @@ public partial class RoomListEntry : UserControl { var storage = new FileStorageProvider("cache"); var storageKey = $"media/{mxcUrl.Replace("mxc://", "").Replace("/", ".")}"; try { - if (!await storage.ObjectExistsAsync(storageKey)) - await storage.SaveStreamAsync(storageKey, await hc.GetStreamAsync(resolvedUrl)); + // if (!await storage.ObjectExistsAsync(storageKey)) + // await storage.SaveStreamAsync(storageKey, await hc.GetStreamAsync(resolvedUrl)); - RoomIcon.Source = new Bitmap(await storage.LoadStreamAsync(storageKey) ?? throw new NullReferenceException()); + // RoomIcon.Source = new Bitmap(await storage.LoadStreamAsync(storageKey) ?? throw new NullReferenceException()); } catch (IOException) { } catch (MatrixException e) { |