diff options
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Bookmark.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Bookmark.java b/src/main/java/eu/siacs/conversations/entities/Bookmark.java index 0210da245..acb4bf1a3 100644 --- a/src/main/java/eu/siacs/conversations/entities/Bookmark.java +++ b/src/main/java/eu/siacs/conversations/entities/Bookmark.java @@ -138,6 +138,16 @@ public class Bookmark extends Element implements ListItem { return this.getAttribute("name"); } + public boolean setBookmarkName(String name) { + String before = getBookmarkName(); + if (name != null && !name.equals(before)) { + this.setAttribute("name", name); + return true; + } else { + return false; + } + } + public void unregisterConversation() { if (this.mJoinedConversation != null) { this.mJoinedConversation.deregisterWithBookmark(); |