quick_frontend, primitivus: better notifications handling

This commit is contained in:
Goffi 2016-07-24 17:56:14 +02:00
commit e32bd443a3

View file

@ -673,11 +673,11 @@ class PrimitivusApp(QuickApp, InputHistory):
self.notif_bar.setProgress(percentage)
def contactSelected(self, contact_list, entity):
self.clearNotifs(entity, profile=contact_list.profile)
if entity.resource:
# we have clicked on a private MUC conversation
chat_widget = self.widgets.getOrCreateWidget(Chat, entity, on_new_widget=None, force_hash = Chat.getPrivateHash(contact_list.profile, entity), profile=contact_list.profile)
else:
self.clearNotifs(entity, profile=contact_list.profile)
chat_widget = self.widgets.getOrCreateWidget(Chat, entity, on_new_widget=None, profile=contact_list.profile)
self.selectWidget(chat_widget)
self.menu_roller.addMenu(_('Chat menu'), chat_widget.getMenu(), C.MENU_ID_WIDGET)