Mercurial > libervia-backend
comparison 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 |
comparison
equal
deleted
inserted
replaced
2844:fa1cc09df195 | 2845:42380a4f6433 |
---|---|
123 yield w | 123 yield w |
124 | 124 |
125 def getWidget(self, class_, target=None, profiles=None): | 125 def getWidget(self, class_, target=None, profiles=None): |
126 """Get a widget without creating it if it doesn't exist. | 126 """Get a widget without creating it if it doesn't exist. |
127 | 127 |
128 @param class_(class): class of the widget to create | 128 @param class_: subclass of QuickWidget, same parameter as used in [getOrCreateWidget] |
129 @param target: target depending of the widget, usually a JID instance | 129 @param target: target depending of the widget, usually a JID instance |
130 @param profiles (unicode, iterable[unicode], None): profile(s) to use (may or may not be | 130 @param profiles (unicode, iterable[unicode], None): profile(s) to use (may or may not be |
131 used, depending of the widget class) | 131 used, depending of the widget class) |
132 @return: a class_ instance or None if the widget doesn't exist | 132 @return: a class_ instance or None if the widget doesn't exist |
133 """ | 133 """ |