remove bookmark after a room is destroyed
This commit is contained in:
parent
835c89328d
commit
77b42ba9ca
|
@ -1853,9 +1853,16 @@ 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()) {
|
||||
bookmark.setAutojoin(false);
|
||||
pushBookmarks(bookmark.getAccount());
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue