# HG changeset patch # User Goffi # Date 1583515143 -3600 # Node ID fc2bea41e40294bf8495e27c3dee459c2d0270d6 # Parent fee8e33e2b3ff506948cfb7eec197052f4cf5ca4 quick frontend(app): new `QuickApp.profileConnected` method diff -r fee8e33e2b3f -r fc2bea41e402 sat_frontends/quick_frontend/quick_app.py --- a/sat_frontends/quick_frontend/quick_app.py Fri Mar 06 18:19:03 2020 +0100 +++ b/sat_frontends/quick_frontend/quick_app.py Fri Mar 06 18:19:03 2020 +0100 @@ -90,6 +90,8 @@ def _plug_profile_isconnected(self, connected): self.connected = connected + if connected: + self.host.profileConnected(self.profile) self.bridge.asyncGetParamA( "autodisconnect", "Connection", @@ -663,6 +665,14 @@ if not self._plugs_in_progress: self.contact_lists.lockUpdate(False) + def profileConnected(self, profile): + """Called when a plugged profile is connected + + it is called independently of profilePlugged (may be called before or after + profilePlugged) + """ + pass + def connect(self, profile, callback=None, errback=None): if not callback: callback = lambda __: None @@ -742,6 +752,7 @@ # A mechanism similar to sync should be available # on a per-profile basis self.sync = True + self.profileConnected(profile) def disconnectedHandler(self, profile): """called when the connection is closed"""