aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_titlebar
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/conversation_titlebar')
-rw-r--r--main/src/ui/conversation_titlebar/occupants_entry.vala8
1 files changed, 5 insertions, 3 deletions
diff --git a/main/src/ui/conversation_titlebar/occupants_entry.vala b/main/src/ui/conversation_titlebar/occupants_entry.vala
index d6ce7f68..0646eee7 100644
--- a/main/src/ui/conversation_titlebar/occupants_entry.vala
+++ b/main/src/ui/conversation_titlebar/occupants_entry.vala
@@ -29,9 +29,9 @@ class OccupantsWidget : MenuButton, Plugins.ConversationTitlebarWidget {
private Conversation? conversation;
private StreamInteractor stream_interactor;
private Window window;
+ private OccupantMenu.View menu = null;
public OccupantsWidget(StreamInteractor stream_interactor, Window window) {
-
image = new Image.from_icon_name("system-users-symbolic", IconSize.MENU);
this.stream_interactor = stream_interactor;
@@ -44,8 +44,10 @@ class OccupantsWidget : MenuButton, Plugins.ConversationTitlebarWidget {
visible = conversation.type_ == Conversation.Type.GROUPCHAT;
if (conversation.type_ == Conversation.Type.GROUPCHAT) {
- OccupantMenu.View menu = new OccupantMenu.View(stream_interactor, window, conversation);
- set_popover(menu);
+ OccupantMenu.View new_menu = new OccupantMenu.View(stream_interactor, window, conversation);
+ set_popover(new_menu);
+ if (menu != null) menu.destroy();
+ menu = new_menu;
}
}
}