mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 03:32:15 -05:00
properly unregister bookmark from conversations when deleting bookmark
This commit is contained in:
parent
8742194f4b
commit
0229a1605e
@ -167,5 +167,6 @@ public class Bookmark extends Element implements ListItem {
|
||||
if (this.mJoinedConversation != null) {
|
||||
this.mJoinedConversation.deregisterWithBookmark();
|
||||
}
|
||||
this.mJoinedConversation = null;
|
||||
}
|
||||
}
|
||||
|
@ -782,6 +782,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
|
||||
if (this.bookmark != null) {
|
||||
this.bookmark.setConversation(null);
|
||||
}
|
||||
this.bookmark = null;
|
||||
}
|
||||
|
||||
public Bookmark getBookmark() {
|
||||
|
@ -495,9 +495,10 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
|
||||
protected void deleteBookmark() {
|
||||
Account account = mConversation.getAccount();
|
||||
Bookmark bookmark = mConversation.getBookmark();
|
||||
bookmark.unregisterConversation();
|
||||
mConversation.deregisterWithBookmark();
|
||||
account.getBookmarks().remove(bookmark);
|
||||
xmppConnectionService.pushBookmarks(account);
|
||||
updateView();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user