aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/notifier_freedesktop.vala
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2023-01-24 18:59:46 +0100
committerMarvin W <git@larma.de>2023-03-05 16:47:46 +0100
commitdb3b0d5f233ee3587ae54f8f035222cb098b11dd (patch)
tree587e5b21a92c8482b25338556d3ef98c764c8ebb /main/src/ui/notifier_freedesktop.vala
parentd81829652057d63b9971b9217996438ee41788ca (diff)
downloaddino-db3b0d5f233ee3587ae54f8f035222cb098b11dd.tar.gz
dino-db3b0d5f233ee3587ae54f8f035222cb098b11dd.zip
New Avatar UI
Diffstat (limited to 'main/src/ui/notifier_freedesktop.vala')
-rw-r--r--main/src/ui/notifier_freedesktop.vala8
1 files changed, 6 insertions, 2 deletions
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<Bytes>(new VariantType("ay"), bytes.get_data(), true, bytes);