Fix a bug where notifications wouldn't display upon a new device being added

This commit is contained in:
Samuel Hand 2018-07-04 17:44:23 +01:00
parent 638d81d67e
commit a3c0c24b7e

View file

@ -26,8 +26,8 @@ public class DeviceNotificationPopulator : NotificationPopulator, Object {
public void init(Conversation conversation, NotificationCollection notification_collection, Plugins.WidgetType type) { public void init(Conversation conversation, NotificationCollection notification_collection, Plugins.WidgetType type) {
current_conversation = conversation; current_conversation = conversation;
this.notification_collection = notification_collection; this.notification_collection = notification_collection;
stream_interactor.module_manager.get_module(conversation.account, StreamModule.IDENTITY).device_list_loaded.connect((jid) => { stream_interactor.module_manager.get_module(conversation.account, StreamModule.IDENTITY).bundle_fetched.connect_after((jid, device_id, bundle) => {
if (jid == conversation.counterpart && has_new_devices(conversation.counterpart) && conversation.type_ == Conversation.Type.CHAT) { if (jid.equals(conversation.counterpart) && has_new_devices(conversation.counterpart) && conversation.type_ == Conversation.Type.CHAT) {
display_notification(); display_notification();
} }
}); });