Commit 9f5c13b5 authored by Philipp Hörist's avatar Philipp Hörist

Dont set default list active on block

There could be another list active (eg. invisible)
If we block someone while invisible, setting the default list
active would make us visible again
parent 25b933e2
......@@ -1774,7 +1774,6 @@ class Connection(CommonConnection, ConnectionHandlers):
self.blocked_contacts.append(contact.jid)
self.set_privacy_list(self.privacy_default_list, self.blocked_list)
if len(self.blocked_list) == 1:
self.set_active_list(self.privacy_default_list)
self.set_default_list(self.privacy_default_list)
def unblock_contacts(self, contact_list):
......@@ -1802,7 +1801,6 @@ class Connection(CommonConnection, ConnectionHandlers):
self.blocked_contacts = []
self.blocked_groups = []
self.set_default_list('')
self.set_active_list('')
self.del_privacy_list(self.privacy_default_list)
else:
self.set_privacy_list(self.privacy_default_list, self.new_blocked_list)
......@@ -1829,7 +1827,6 @@ class Connection(CommonConnection, ConnectionHandlers):
self.blocked_list.append(new_rule)
self.set_privacy_list(self.privacy_default_list, self.blocked_list)
if len(self.blocked_list) == 1:
self.set_active_list(self.privacy_default_list)
self.set_default_list(self.privacy_default_list)
def unblock_group(self, group, contact_list):
......@@ -1847,7 +1844,6 @@ class Connection(CommonConnection, ConnectionHandlers):
self.blocked_contacts = []
self.blocked_groups = []
self.set_default_list('')
self.set_active_list('')
self.del_privacy_list(self.privacy_default_list)
else:
self.set_privacy_list(self.privacy_default_list, self.new_blocked_list)
......
......@@ -2781,7 +2781,6 @@ class GroupchatControl(ChatControlBase):
self.draw_contact(nick)
connection.set_privacy_list(default, connection.blocked_list)
if len(connection.blocked_list) == 1:
connection.set_active_list(default)
connection.set_default_list(default)
def on_unblock(self, widget, nick):
......@@ -2803,7 +2802,6 @@ class GroupchatControl(ChatControlBase):
connection.blocked_contacts = []
connection.blocked_groups = []
connection.set_default_list('')
connection.set_active_list('')
connection.del_privacy_list(default)
if 'privay_list_block' in gajim.interface.instances[self.account]:
del gajim.interface.instances[self.account]\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment