mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-30 20:52:21 -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) {
|
if (this.mJoinedConversation != null) {
|
||||||
this.mJoinedConversation.deregisterWithBookmark();
|
this.mJoinedConversation.deregisterWithBookmark();
|
||||||
}
|
}
|
||||||
|
this.mJoinedConversation = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -782,6 +782,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
|
|||||||
if (this.bookmark != null) {
|
if (this.bookmark != null) {
|
||||||
this.bookmark.setConversation(null);
|
this.bookmark.setConversation(null);
|
||||||
}
|
}
|
||||||
|
this.bookmark = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Bookmark getBookmark() {
|
public Bookmark getBookmark() {
|
||||||
|
@ -495,9 +495,10 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
|
|||||||
protected void deleteBookmark() {
|
protected void deleteBookmark() {
|
||||||
Account account = mConversation.getAccount();
|
Account account = mConversation.getAccount();
|
||||||
Bookmark bookmark = mConversation.getBookmark();
|
Bookmark bookmark = mConversation.getBookmark();
|
||||||
bookmark.unregisterConversation();
|
mConversation.deregisterWithBookmark();
|
||||||
account.getBookmarks().remove(bookmark);
|
account.getBookmarks().remove(bookmark);
|
||||||
xmppConnectionService.pushBookmarks(account);
|
xmppConnectionService.pushBookmarks(account);
|
||||||
|
updateView();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user