fix: properly dispose PopoverMenus

This commit is contained in:
Evangelos Paterakis 2023-01-22 10:27:31 +02:00
parent 1b9e9aef08
commit a43ce8d6ba
No known key found for this signature in database
GPG Key ID: FE5185F095BFC8C9
2 changed files with 5 additions and 1 deletions

View File

@ -16,7 +16,6 @@ public class Tooth.Widgets.Attachment.Item : Adw.Bin {
protected Button button;
protected Label badge;
private void copy_url () {
Host.copy (entity.url);
}
@ -95,6 +94,10 @@ public class Tooth.Widgets.Attachment.Item : Adw.Bin {
child = overlay;
child.add_css_class ("attachment");
}
~Item () {
message ("Destroying Attachment.Item widget");
context_menu.unparent ();
}
protected void create_context_menu() {
var menu_model = new GLib.Menu ();

View File

@ -173,6 +173,7 @@ public class Tooth.Widgets.Status : ListBoxRow {
}
~Status () {
message ("Destroying Status widget");
context_menu.unparent ();
}
protected void create_context_menu() {