Don't act like if self contact is in group General. See #4000.
Don't make General group visible when we have self contact.
This commit is contained in:
		
							parent
							
								
									40e360d1c8
								
							
						
					
					
						commit
						0d645437d8
					
				
					 1 changed files with 7 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -953,7 +953,9 @@ class RosterWindow:
 | 
			
		|||
		groups = contact.groups
 | 
			
		||||
		if contact.is_observer():
 | 
			
		||||
			groups = [_('Observers')]
 | 
			
		||||
		elif not groups:
 | 
			
		||||
		elif not groups and \
 | 
			
		||||
		not contact.jid == gajim.get_jid_from_account(account):
 | 
			
		||||
			# no group, and not self contact
 | 
			
		||||
			groups = [_('General')]
 | 
			
		||||
 | 
			
		||||
		# gets number of unread gc marked messages
 | 
			
		||||
| 
						 | 
				
			
			@ -1375,9 +1377,11 @@ class RosterWindow:
 | 
			
		|||
				accounts = [account]
 | 
			
		||||
			for _acc in accounts:
 | 
			
		||||
				for contact in gajim.contacts.iter_contacts(_acc):
 | 
			
		||||
					# Is this contact in this group ?
 | 
			
		||||
					# Is this contact in this group ? (last part of if check if it's 
 | 
			
		||||
					# self contact) 
 | 
			
		||||
					if group in contact.groups or (group == _('General') and not \
 | 
			
		||||
					contact.groups):
 | 
			
		||||
					contact.groups and \
 | 
			
		||||
					not contact.jid == gajim.get_jid_from_account(account)):
 | 
			
		||||
						if self.contact_is_visible(contact, _acc):
 | 
			
		||||
							return True
 | 
			
		||||
			return False
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue