aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-07 23:03:27 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-07 23:03:27 +0200
commitb1daabbb86e41d0a07737e0951530322f1cdedfe (patch)
tree9612a11333f6823f6e213bae899a1c842568a152
parente41bd5376211eb8396979cae38d6000a433ea67b (diff)
cache bookmark jid in bookmark
-rw-r--r--src/main/java/de/pixart/messenger/entities/Bookmark.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Bookmark.java b/src/main/java/de/pixart/messenger/entities/Bookmark.java
index a09ad794e..8388d48f8 100644
--- a/src/main/java/de/pixart/messenger/entities/Bookmark.java
+++ b/src/main/java/de/pixart/messenger/entities/Bookmark.java
@@ -15,9 +15,11 @@ public class Bookmark extends Element implements ListItem {
private Account account;
private WeakReference<Conversation> conversation;
+ private Jid jid;
public Bookmark(final Account account, final Jid jid) {
super("conference");
+ this.jid = jid;
this.setAttribute("jid", jid.toString());
this.account = account;
}
@@ -31,6 +33,7 @@ public class Bookmark extends Element implements ListItem {
Bookmark bookmark = new Bookmark(account);
bookmark.setAttributes(element.getAttributes());
bookmark.setChildren(element.getChildren());
+ bookmark.jid = bookmark.getAttributeAsJid("jid");
return bookmark;
}
@@ -70,7 +73,7 @@ public class Bookmark extends Element implements ListItem {
@Override
public Jid getJid() {
- return this.getAttributeAsJid("jid");
+ return this.jid;
}
@Override