quick frontend (app): added debug logs on sync state change + refill contact lists on resync when AUTO_RESYNC is set

This commit is contained in:
Goffi 2019-04-07 21:06:57 +02:00
commit 9f147f1c36

View file

@ -459,8 +459,10 @@ class QuickApp(object):
or if connection has been lost and a reconnection is needed
"""
if state:
log.debug(u"we are synchronised with server")
if self.AUTO_RESYNC:
# we are resynchronising all widgets
log.debug(u"doing a full widgets resynchronisation")
for w in self.widgets:
try:
resync = w.resync
@ -468,8 +470,11 @@ class QuickApp(object):
pass
else:
resync()
self.contact_lists.fill()
self._sync = state
else:
log.debug(u"we have lost synchronisation with server")
self._sync = state
# we've lost synchronisation, all widgets must be notified
# note: this is always called independently of AUTO_RESYNC