comparison frontends/src/quick_frontend/quick_app.py @ 1418:6adf1b0be609

quick_frontend: ask for the roster in connectedHandler instead of in ProfileManager, because we need it also when reconnecting after a disconnection whithout restarting the frontend
author souliane <souliane@mailoo.org>
date Mon, 20 Apr 2015 16:46:17 +0200
parents 176de79c8c39
children 798e5e38516b
comparison
equal deleted inserted replaced
1417:176de79c8c39 1418:6adf1b0be609
96 contact_list.setCache(jid.JID(entity), key, value) 96 contact_list.setCache(jid.JID(entity), key, value)
97 97
98 if not self.bridge.isConnected(self.profile): 98 if not self.bridge.isConnected(self.profile):
99 self.host.setPresenceStatus(C.PRESENCE_UNAVAILABLE, '', profile=self.profile) 99 self.host.setPresenceStatus(C.PRESENCE_UNAVAILABLE, '', profile=self.profile)
100 else: 100 else:
101
102 contact_list.fill()
103 self.host.setPresenceStatus(profile=self.profile) 101 self.host.setPresenceStatus(profile=self.profile)
104 102
105 #The waiting subscription requests 103 #The waiting subscription requests
106 self.bridge.getWaitingSub(self.profile, callback=self._plug_profile_gotWaitingSub) 104 self.bridge.getWaitingSub(self.profile, callback=self._plug_profile_gotWaitingSub)
107 105
441 439
442 def connectedHandler(self, profile): 440 def connectedHandler(self, profile):
443 """called when the connection is made""" 441 """called when the connection is made"""
444 log.debug(_("Connected")) 442 log.debug(_("Connected"))
445 self.setPresenceStatus(profile=profile) 443 self.setPresenceStatus(profile=profile)
444 self.contact_lists[profile].fill()
446 445
447 def disconnectedHandler(self, profile): 446 def disconnectedHandler(self, profile):
448 """called when the connection is closed""" 447 """called when the connection is closed"""
449 log.debug(_("Disconnected")) 448 log.debug(_("Disconnected"))
450 self.contact_lists[profile].clearContacts() 449 self.contact_lists[profile].clearContacts()