diff --git a/src/main/java/eu/siacs/conversations/entities/Bookmark.java b/src/main/java/eu/siacs/conversations/entities/Bookmark.java index e6aeadf4..f44ac636 100644 --- a/src/main/java/eu/siacs/conversations/entities/Bookmark.java +++ b/src/main/java/eu/siacs/conversations/entities/Bookmark.java @@ -167,5 +167,6 @@ public class Bookmark extends Element implements ListItem { if (this.mJoinedConversation != null) { this.mJoinedConversation.deregisterWithBookmark(); } + this.mJoinedConversation = null; } } diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index 146c8cc9..51722150 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -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() { diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java index 378e61c6..da9ba754 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java @@ -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