aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_content_view
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-02-17 14:50:23 -0600
committerfiaxh <git@lightrise.org>2021-02-17 15:25:55 -0600
commita417cb396b18fe7ffc2a75fc640327d70793f85d (patch)
tree4251093670ffd6a360989625b5944097cb53e4f2 /main/src/ui/conversation_content_view
parent80c8e18cea4f243ffa7caa921f8bf6d9baca01bd (diff)
downloaddino-a417cb396b18fe7ffc2a75fc640327d70793f85d.tar.gz
dino-a417cb396b18fe7ffc2a75fc640327d70793f85d.zip
Fix cyclic reference
Diffstat (limited to 'main/src/ui/conversation_content_view')
-rw-r--r--main/src/ui/conversation_content_view/conversation_item_skeleton.vala16
1 files changed, 9 insertions, 7 deletions
diff --git a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
index 96a2368a..c0099bf4 100644
--- a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
+++ b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
@@ -32,13 +32,7 @@ public class ConversationItemSkeleton : EventBox {
this.get_style_context().add_class("message-box");
item.bind_property("in-edit-mode", this, "item-in-edit-mode");
- this.notify["item-in-edit-mode"].connect(() => {
- if (item.in_edit_mode) {
- this.get_style_context().add_class("edit-mode");
- } else {
- this.get_style_context().remove_class("edit-mode");
- }
- });
+ this.notify["item-in-edit-mode"].connect(update_edit_mode);
widget = item.get_widget(Plugins.WidgetType.GTK) as Widget;
if (widget != null) {
@@ -94,6 +88,14 @@ public class ConversationItemSkeleton : EventBox {
image_content_box.margin_bottom = 4;
}
}
+
+ private void update_edit_mode() {
+ if (item.in_edit_mode) {
+ this.get_style_context().add_class("edit-mode");
+ } else {
+ this.get_style_context().remove_class("edit-mode");
+ }
+ }
}
[GtkTemplate (ui = "/im/dino/Dino/conversation_content_view/item_metadata_header.ui")]