aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/notifier_gnotifications.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_gnotifications.vala
parentd81829652057d63b9971b9217996438ee41788ca (diff)
downloaddino-db3b0d5f233ee3587ae54f8f035222cb098b11dd.tar.gz
dino-db3b0d5f233ee3587ae54f8f035222cb098b11dd.zip
New Avatar UI
Diffstat (limited to 'main/src/ui/notifier_gnotifications.vala')
-rw-r--r--main/src/ui/notifier_gnotifications.vala8
1 files changed, 6 insertions, 2 deletions
diff --git a/main/src/ui/notifier_gnotifications.vala b/main/src/ui/notifier_gnotifications.vala
index d569a358..90c8ca8c 100644
--- a/main/src/ui/notifier_gnotifications.vala
+++ b/main/src/ui/notifier_gnotifications.vala
@@ -171,8 +171,12 @@ namespace Dino.Ui {
}
private async Icon get_conversation_icon(Conversation conversation) throws Error {
- 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());
uint8[] buffer;
avatar.save_to_buffer(out buffer, "png");