unregister bookmark on conversation when bookmark is deleted

This commit is contained in:
iNPUTmice 2014-07-15 20:41:10 +02:00
parent fc5143734e
commit e20842608b
2 changed files with 7 additions and 0 deletions

View file

@ -122,4 +122,10 @@ public class Bookmark implements ListItem {
}
return element;
}
public void unregisterConversation() {
if (this.mJoinedConversation != null) {
this.mJoinedConversation.deregisterWithBookmark();
}
}
}

View file

@ -278,6 +278,7 @@ public class StartConversation extends XmppActivity {
@Override
public void onClick(DialogInterface dialog, int which) {
bookmark.unregisterConversation();
Account account = bookmark.getAccount();
account.getBookmarks().remove(bookmark);
xmppConnectionService.pushBookmarks(account);