# HG changeset patch # User Goffi # Date 1554664189 -7200 # Node ID 5b0f897689b7e5e100d1999df72c0b802127e25f # Parent fc78d53f0ffaaa90e3180b25155d2b43cc9758c1 quick frontend (app): (un)set sync state on (dis)connect: when connected signal is received, a whole (re)connection has happened, meaning that everything is potentially out of sync (opened widget and contact lists), so host.sync is set accordingly. It's a temporary option, as (dis)connect is a per-profile signal, and host.sync is global. Methods similar to sync workflow must be implemented on a per-profile basis. diff -r fc78d53f0ffa -r 5b0f897689b7 sat_frontends/quick_frontend/quick_app.py --- a/sat_frontends/quick_frontend/quick_app.py Sun Apr 07 21:06:57 2019 +0200 +++ b/sat_frontends/quick_frontend/quick_app.py Sun Apr 07 21:09:49 2019 +0200 @@ -696,12 +696,22 @@ log.debug(_("Connected")) self.profiles[profile].whoami = jid.JID(jid_s) self.setPresenceStatus(profile=profile) + # FIXME: fill() is already called for all profiles when doing self.sync = True + # a per-profile fill() should be done once, see below note self.contact_lists[profile].fill() + # if we were already displaying widgets, they must be resynchronized + # FIXME: self.sync is for all profiles + # while (dis)connection is per-profile. + # A mechanism similar to sync should be available + # on a per-profile basis + self.sync = True def disconnectedHandler(self, profile): """called when the connection is closed""" log.debug(_("Disconnected")) self.contact_lists[profile].disconnect() + # FIXME: see note on connectedHandler + self.sync = False self.setPresenceStatus(C.PRESENCE_UNAVAILABLE, "", profile=profile) def actionNewHandler(self, action_data, id_, security_limit, profile):