Fixed name change (#1076)
This commit is contained in:
parent
e7594fd646
commit
53385903ba
|
@ -114,6 +114,7 @@ public class ItemMetaDataHeader : Box {
|
||||||
public Entities.Message.Marked item_mark { get; set; }
|
public Entities.Message.Marked item_mark { get; set; }
|
||||||
private ArrayList<Plugins.MetaConversationItem> items = new ArrayList<Plugins.MetaConversationItem>();
|
private ArrayList<Plugins.MetaConversationItem> items = new ArrayList<Plugins.MetaConversationItem>();
|
||||||
private uint time_update_timeout = 0;
|
private uint time_update_timeout = 0;
|
||||||
|
private ulong updated_roster_handler_id = 0;
|
||||||
|
|
||||||
public ItemMetaDataHeader(StreamInteractor stream_interactor, Conversation conversation, Plugins.MetaConversationItem item) {
|
public ItemMetaDataHeader(StreamInteractor stream_interactor, Conversation conversation, Plugins.MetaConversationItem item) {
|
||||||
this.stream_interactor = stream_interactor;
|
this.stream_interactor = stream_interactor;
|
||||||
|
@ -123,6 +124,11 @@ public class ItemMetaDataHeader : Box {
|
||||||
|
|
||||||
update_name_label();
|
update_name_label();
|
||||||
name_label.style_updated.connect(update_name_label);
|
name_label.style_updated.connect(update_name_label);
|
||||||
|
updated_roster_handler_id = stream_interactor.get_module(RosterManager.IDENTITY).updated_roster_item.connect((account, jid, roster_item) => {
|
||||||
|
if (this.conversation.account.equals(account) && this.conversation.counterpart.equals(jid)) {
|
||||||
|
update_name_label();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Application app = GLib.Application.get_default() as Application;
|
Application app = GLib.Application.get_default() as Application;
|
||||||
|
|
||||||
|
@ -280,12 +286,15 @@ public class ItemMetaDataHeader : Box {
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void dispose() {
|
public override void dispose() {
|
||||||
base.dispose();
|
|
||||||
|
|
||||||
if (time_update_timeout != 0) {
|
if (time_update_timeout != 0) {
|
||||||
Source.remove(time_update_timeout);
|
Source.remove(time_update_timeout);
|
||||||
time_update_timeout = 0;
|
time_update_timeout = 0;
|
||||||
}
|
}
|
||||||
|
if (updated_roster_handler_id != 0){
|
||||||
|
stream_interactor.get_module(RosterManager.IDENTITY).disconnect(updated_roster_handler_id);
|
||||||
|
updated_roster_handler_id = 0;
|
||||||
|
}
|
||||||
|
base.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,11 @@ public class ConversationViewController : Object {
|
||||||
update_conversation_topic(subject);
|
update_conversation_topic(subject);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
stream_interactor.get_module(RosterManager.IDENTITY).updated_roster_item.connect((account, jid, roster_item) => {
|
||||||
|
if (conversation.account.equals(account) && conversation.counterpart.equals(jid)) {
|
||||||
|
update_conversation_display_name();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
stream_interactor.get_module(FileManager.IDENTITY).upload_available.connect(update_file_upload_status);
|
stream_interactor.get_module(FileManager.IDENTITY).upload_available.connect(update_file_upload_status);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue