diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java | 5 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/StartConversationActivity.java | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java index 6c41187e0..21442bcd1 100644 --- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java @@ -396,8 +396,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers if (mConversation == null) { return true; } - Account account = mConversation.getAccount(); - if (account.hasBookmarkFor(mConversation.getJid().toBareJid())) { + if (mConversation.getBookmark() != null) { menuItemSaveBookmark.setVisible(false); menuItemDeleteBookmark.setVisible(true); } else { @@ -568,7 +567,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers protected void deleteBookmark() { Account account = mConversation.getAccount(); Bookmark bookmark = mConversation.getBookmark(); - mConversation.deregisterWithBookmark(); + bookmark.setConversation(null); account.getBookmarks().remove(bookmark); xmppConnectionService.pushBookmarks(account); updateView(); diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java index 2f0f69ee8..83427a713 100644 --- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java @@ -361,7 +361,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU return; } Conversation conversation = xmppConnectionService.findOrCreateConversation(bookmark.getAccount(), jid, true, true, true); - conversation.setBookmark(bookmark); + bookmark.setConversation(conversation); if (!bookmark.autojoin() && getPreferences().getBoolean("autojoin", getResources().getBoolean(R.bool.autojoin))) { bookmark.setAutojoin(true); xmppConnectionService.pushBookmarks(bookmark.getAccount()); @@ -412,7 +412,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU @Override public void onClick(DialogInterface dialog, int which) { - bookmark.unregisterConversation(); + bookmark.setConversation(null); Account account = bookmark.getAccount(); account.getBookmarks().remove(bookmark); xmppConnectionService.pushBookmarks(account); @@ -517,7 +517,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU xmppConnectionService.pushBookmarks(account); final Conversation conversation = xmppConnectionService .findOrCreateConversation(account, conferenceJid, true, true, true); - conversation.setBookmark(bookmark); + bookmark.setConversation(conversation); dialog.dismiss(); mCurrentDialog = null; switchToConversation(conversation); |