aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_content_view/content_populator.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-05-28 17:31:31 +0200
committerfiaxh <git@lightrise.org>2020-06-03 21:50:40 +0200
commit8fe723bccb1dbcc38ec2742195cc77702f7f3f52 (patch)
treec4b8f03db975149555266ed546e48e03f987ad9b /main/src/ui/conversation_content_view/content_populator.vala
parenta9e6a9c3d58002810757f1e3f4fc9c9488b48fc4 (diff)
downloaddino-8fe723bccb1dbcc38ec2742195cc77702f7f3f52.tar.gz
dino-8fe723bccb1dbcc38ec2742195cc77702f7f3f52.zip
Fix cyclic references => let objects be freed
Diffstat (limited to 'main/src/ui/conversation_content_view/content_populator.vala')
-rw-r--r--main/src/ui/conversation_content_view/content_populator.vala7
1 files changed, 1 insertions, 6 deletions
diff --git a/main/src/ui/conversation_content_view/content_populator.vala b/main/src/ui/conversation_content_view/content_populator.vala
index 2a0f8ac1..48a9e12a 100644
--- a/main/src/ui/conversation_content_view/content_populator.vala
+++ b/main/src/ui/conversation_content_view/content_populator.vala
@@ -86,12 +86,7 @@ public abstract class ContentMetaItem : Plugins.MetaConversationItem {
this.encryption = content_item.encryption;
this.mark = content_item.mark;
- WeakRef weak_item = WeakRef(content_item);
- content_item.notify["mark"].connect(() => {
- ContentItem? ci = weak_item.get() as ContentItem;
- if (ci == null) return;
- this.mark = ci.mark;
- });
+ content_item.bind_property("mark", this, "mark");
this.can_merge = true;
this.requires_avatar = true;