소스 검색

Avoid bookmark toggle duplication

JC Brand 6 년 전
부모
커밋
201b8559b6
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/converse-bookmarks.js

+ 4 - 0
src/converse-bookmarks.js

@@ -63,8 +63,12 @@
                 },
 
                 renderBookmarkToggle () {
+                    if (this.el.querySelector('.chat-head .toggle-bookmark')) {
+                        return;
+                    }
                     const { _converse } = this.__super__,
                           { __ } = _converse;
+
                     const bookmark_button = tpl_chatroom_bookmark_toggle(
                         _.assignIn(this.model.toJSON(), {
                             info_toggle_bookmark: __('Bookmark this groupchat'),