aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_content_view
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/conversation_content_view')
-rw-r--r--main/src/ui/conversation_content_view/conversation_item_skeleton.vala2
-rw-r--r--main/src/ui/conversation_content_view/conversation_view.vala9
2 files changed, 5 insertions, 6 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 c3db09e0..96a2368a 100644
--- a/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
+++ b/main/src/ui/conversation_content_view/conversation_item_skeleton.vala
@@ -164,7 +164,7 @@ public class ItemMetaDataHeader : Box {
this.reorder_child(unencrypted_image, 3);
Util.force_error_color(unencrypted_image);
} else if (conversation.encryption == Encryption.NONE && unencrypted_image != null) {
- unencrypted_image.destroy();
+ this.remove(unencrypted_image);
unencrypted_image = null;
}
}
diff --git a/main/src/ui/conversation_content_view/conversation_view.vala b/main/src/ui/conversation_content_view/conversation_view.vala
index 70b16bd9..9eb18cfd 100644
--- a/main/src/ui/conversation_content_view/conversation_view.vala
+++ b/main/src/ui/conversation_content_view/conversation_view.vala
@@ -318,9 +318,8 @@ public class ConversationView : Box, Plugins.ConversationItemCollection, Plugins
private void remove_item(Plugins.MetaConversationItem item) {
ConversationItemSkeleton? skeleton = item_item_skeletons[item];
if (skeleton != null) {
- widgets[item].destroy();
+ main.remove(skeleton);
widgets.unset(item);
- skeleton.destroy();
item_skeletons.remove(skeleton);
item_item_skeletons.unset(item);
@@ -356,7 +355,7 @@ public class ConversationView : Box, Plugins.ConversationItemCollection, Plugins
public void remove_notification(Widget widget) {
notification_revealer.reveal_child = false;
- widget.destroy();
+ notifications.remove(widget);
}
private Widget insert_new(Plugins.MetaConversationItem item) {
@@ -484,11 +483,11 @@ public class ConversationView : Box, Plugins.ConversationItemCollection, Plugins
item_skeletons.clear();
item_item_skeletons.clear();
widgets.clear();
- main.@foreach((widget) => { widget.destroy(); });
+ main.@foreach((widget) => { main.remove(widget); });
}
private void clear_notifications() {
- notifications.@foreach((widget) => { widget.destroy(); });
+ notifications.@foreach((widget) => { notifications.remove(widget); });
notification_revealer.transition_duration = 0;
notification_revealer.set_reveal_child(false);
}