aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/eu/siacs/conversations/entities/Bookmark.java6
-rw-r--r--src/eu/siacs/conversations/ui/StartConversation.java1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/entities/Bookmark.java b/src/eu/siacs/conversations/entities/Bookmark.java
index c4e151cb..38c03410 100644
--- a/src/eu/siacs/conversations/entities/Bookmark.java
+++ b/src/eu/siacs/conversations/entities/Bookmark.java
@@ -122,4 +122,10 @@ public class Bookmark implements ListItem {
}
return element;
}
+
+ public void unregisterConversation() {
+ if (this.mJoinedConversation != null) {
+ this.mJoinedConversation.deregisterWithBookmark();
+ }
+ }
}
diff --git a/src/eu/siacs/conversations/ui/StartConversation.java b/src/eu/siacs/conversations/ui/StartConversation.java
index da6c967b..f23eb420 100644
--- a/src/eu/siacs/conversations/ui/StartConversation.java
+++ b/src/eu/siacs/conversations/ui/StartConversation.java
@@ -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);