Mercurial > libervia-backend
diff sat_frontends/quick_frontend/quick_widgets.py @ 2845:42380a4f6433
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.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 09 Mar 2019 16:33:31 +0100 |
parents | 441b536e28ed |
children | 7764383a968c |
line wrap: on
line diff
--- a/sat_frontends/quick_frontend/quick_widgets.py Sat Mar 09 16:24:17 2019 +0100 +++ b/sat_frontends/quick_frontend/quick_widgets.py Sat Mar 09 16:33:31 2019 +0100 @@ -125,7 +125,7 @@ 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)