diff options
-rw-r--r-- | main/src/ui/conversation_content_view/conversation_item_skeleton.vala | 16 |
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")] |