From db3b0d5f233ee3587ae54f8f035222cb098b11dd Mon Sep 17 00:00:00 2001 From: Marvin W Date: Tue, 24 Jan 2023 18:59:46 +0100 Subject: New Avatar UI --- main/src/ui/notifier_freedesktop.vala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'main/src/ui/notifier_freedesktop.vala') diff --git a/main/src/ui/notifier_freedesktop.vala b/main/src/ui/notifier_freedesktop.vala index b6b31d34..8af96975 100644 --- a/main/src/ui/notifier_freedesktop.vala +++ b/main/src/ui/notifier_freedesktop.vala @@ -287,8 +287,12 @@ public class Dino.Ui.FreeDesktopNotifier : NotificationProvider, Object { } private async Variant get_conversation_icon(Conversation conversation) { - AvatarDrawer drawer = yield Util.get_conversation_avatar_drawer(stream_interactor, conversation); - Cairo.ImageSurface surface = drawer.size(40, 40).draw_image_surface(); + CompatAvatarDrawer drawer = new CompatAvatarDrawer() { + model = new ViewModel.CompatAvatarPictureModel(stream_interactor).set_conversation(conversation), + width_request = 40, + height_request = 40 + }; + Cairo.ImageSurface surface = drawer.draw_image_surface(); Gdk.Pixbuf avatar = Gdk.pixbuf_get_from_surface(surface, 0, 0, surface.get_width(), surface.get_height()); var bytes = avatar.pixel_bytes; var image_bytes = Variant.new_from_data(new VariantType("ay"), bytes.get_data(), true, bytes); -- cgit v1.2.3-54-g00ecf