remove bookmark after a room is destroyed
This commit is contained in:
		
							parent
							
								
									835c89328d
								
							
						
					
					
						commit
						77b42ba9ca
					
				| 
						 | 
				
			
			@ -1853,11 +1853,18 @@ public class XmppConnectionService extends Service {
 | 
			
		|||
			if (conversation.getMode() == Conversation.MODE_MULTI) {
 | 
			
		||||
				if (conversation.getAccount().getStatus() == Account.State.ONLINE) {
 | 
			
		||||
					Bookmark bookmark = conversation.getBookmark();
 | 
			
		||||
					if (maySyncronizeWithBookmarks && bookmark != null && bookmark.autojoin() && synchronizeWithBookmarks()) {
 | 
			
		||||
					if (maySyncronizeWithBookmarks && bookmark != null && synchronizeWithBookmarks()) {
 | 
			
		||||
						if (conversation.getMucOptions().getError() == MucOptions.Error.DESTROYED) {
 | 
			
		||||
							Account account = bookmark.getAccount();
 | 
			
		||||
							bookmark.setConversation(null);
 | 
			
		||||
							account.getBookmarks().remove(bookmark);
 | 
			
		||||
							pushBookmarks(account);
 | 
			
		||||
						} else if (bookmark.autojoin()) {
 | 
			
		||||
							bookmark.setAutojoin(false);
 | 
			
		||||
							pushBookmarks(bookmark.getAccount());
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				leaveMuc(conversation);
 | 
			
		||||
			} else {
 | 
			
		||||
				if (conversation.getContact().getOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue