quick frontend (app): new synchronisation mechanism:

on some frontend (notably on mobiles) frontend can be paused and lose synchronisation with backend, this can also happen if backend restart a connexion without resuming using stream management. To manage that, QuickApp now has a sync attribute which is True when the backend is in sync with frontend.
When synchronisation has been lost and is possible again, all widget will have their "resync" method called, which can be used to do necessary calls to update the status.
It's the responsability of each widget to then reset the "sync" attribute, once everything has been resynchronised.
This commit is contained in:
Goffi 2019-03-09 16:33:31 +01:00
commit fe4a6abfae

View file

@ -125,7 +125,7 @@ class QuickWidgetsManager(object):
def getWidget(self, class_, target=None, profiles=None):
"""Get a widget without creating it if it doesn't exist.
@param class_(class): class of the widget to create
@param class_: subclass of QuickWidget, same parameter as used in [getOrCreateWidget]
@param target: target depending of the widget, usually a JID instance
@param profiles (unicode, iterable[unicode], None): profile(s) to use (may or may not be
used, depending of the widget class)