Make Sopranica bookmark deleteable.
Added lines to first check if the bookmark has been deleted, if so skips adding the bookmark.
This commit is contained in:
parent
48132e2dbb
commit
5ba4e0db44
|
@ -1843,6 +1843,9 @@ public class XmppConnectionService extends Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteBookmark(final Account account, final Bookmark bookmark) {
|
public void deleteBookmark(final Account account, final Bookmark bookmark) {
|
||||||
|
if (bookmark.getJid().toString().equals("discuss@conference.soprani.ca")) {
|
||||||
|
getPreferences().edit().putBoolean("cheogram_sopranica_bookmark_deleted", true).apply();
|
||||||
|
}
|
||||||
account.removeBookmark(bookmark);
|
account.removeBookmark(bookmark);
|
||||||
final XmppConnection connection = account.getXmppConnection();
|
final XmppConnection connection = account.getXmppConnection();
|
||||||
if (connection.getFeatures().bookmarks2()) {
|
if (connection.getFeatures().bookmarks2()) {
|
||||||
|
|
|
@ -986,7 +986,9 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
|
||||||
|
|
||||||
Collections.sort(this.contacts);
|
Collections.sort(this.contacts);
|
||||||
|
|
||||||
if (!foundSopranica && (needle == null || needle.equals(""))) {
|
final boolean sopranicaDeleted = getPreferences().getBoolean("cheogram_sopranica_bookmark_deleted", false);
|
||||||
|
|
||||||
|
if (!sopranicaDeleted && !foundSopranica && (needle == null || needle.equals(""))) {
|
||||||
Bookmark bookmark = new Bookmark(
|
Bookmark bookmark = new Bookmark(
|
||||||
xmppConnectionService.getAccounts().get(0),
|
xmppConnectionService.getAccounts().get(0),
|
||||||
Jid.of("discuss@conference.soprani.ca")
|
Jid.of("discuss@conference.soprani.ca")
|
||||||
|
|
Loading…
Reference in a new issue