comparison frontends/src/quick_frontend/quick_contact_list.py @ 2016:f09562b0704d

quick_frontend, primitivus: better notifications handling
author Goffi <goffi@goffi.org>
date Sun, 24 Jul 2016 17:56:14 +0200
parents 20fb71b656e3
children 7aa58b7a47e2
comparison
equal deleted inserted replaced
2015:20fb71b656e3 2016:f09562b0704d
382 else: 382 else:
383 selected = {selected.bare for selected in self._selected} 383 selected = {selected.bare for selected in self._selected}
384 return ((show is not None and show != C.PRESENCE_UNAVAILABLE) 384 return ((show is not None and show != C.PRESENCE_UNAVAILABLE)
385 or self.show_disconnected 385 or self.show_disconnected
386 or entity in selected 386 or entity in selected
387 or self.host.getNotifs(entity.bare, profile=self.profile) 387 or next(self.host.getNotifs(entity.bare, profile=self.profile), None)
388 ) 388 )
389 389
390 def anyEntityToShow(self, entities, check_resources=False): 390 def anyEntityToShow(self, entities, check_resources=False):
391 """Tell if in a list of entities, at least one should be shown 391 """Tell if in a list of entities, at least one should be shown
392 392