# HG changeset patch # User Goffi # Date 1541776665 -3600 # Node ID ce1e15d594962153d5c33d59d219dafa8c485b7a # Parent eb69ec549d051e0a881fb4e5af448bd8383fd139 quick frontend (contact list): use property to retrieve "whoami" in ProfileContactList: this avoid a crash introduced by early creation of contact list during profile plugging, and avoid desynchronisation risk. diff -r eb69ec549d05 -r ce1e15d59496 sat_frontends/quick_frontend/quick_contact_list.py --- a/sat_frontends/quick_frontend/quick_contact_list.py Mon Nov 05 09:13:05 2018 +0100 +++ b/sat_frontends/quick_frontend/quick_contact_list.py Fri Nov 09 16:17:45 2018 +0100 @@ -83,9 +83,6 @@ # selected entities, full jid self._selected = set() - # we keep our own jid - self.whoami = self.host.profiles[profile].whoami - # options self.show_disconnected = False self.show_empty_groups = True @@ -122,6 +119,10 @@ # notifListener only update the entity, so we can re-use it self.host.addListener("notificationsClear", self.notifListener, [self.profile]) + @property + def whoami(self): + return self.host.profiles[self.profile].whoami + def _showEmptyGroups(self, show_str): # Called only by __init__ # self.update is not wanted here, as it is done by