Skip to content
Snippets Groups Projects
Commit 40d298c2 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

don't count our jid in number of contacts, count transport only if...

don't count our jid in number of contacts, count transport only if show_transports_group is True, update transports row when a transport connects / disconnects. fixes #1728
parent c86f7fce
No related branches found
No related tags found
No related merge requests found
......@@ -259,8 +259,12 @@ class Contacts:
nbr_online = 0
nbr_total = 0
for account in accounts:
our_jid = common.gajim.get_jid_from_account(account)
for jid in self.get_jid_list(account):
if common.gajim.jid_is_transport(jid):
if jid == our_jid:
continue
if common.gajim.jid_is_transport(jid) and not \
common.gajim.config.get('show_transports_group'):
# do not count transports
continue
contact = self.get_contact_with_highest_priority(account, jid)
......
......@@ -440,6 +440,7 @@ class Interface:
if ji in jid_list:
# Update existing iter
self.roster.draw_contact(ji, account)
self.roster.draw_group(_('Transports'), account)
# transport just signed in/out, don't show popup notifications
# for 30s
account_ji = account + '/' + ji
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment