浏览代码

Fix for issue #261

When converse is first initialized this.model.get('closed') is undefined, at least with some configurations. This patch initializes the attribute with !show_controlbox_by_default if it is undefined.

Update CHANGES.md

fix make check

Update CHANGES.md
Christopher Rüprich 9 年之前
父节点
当前提交
aec966e36a
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 3 0
      converse.js
  2. 1 0
      docs/CHANGES.md

+ 3 - 0
converse.js

@@ -2555,6 +2555,9 @@
                 if (this.model.get('connected')) {
                 if (this.model.get('connected')) {
                     this.initRoster();
                     this.initRoster();
                 }
                 }
+                if (typeof this.model.get('closed')==='undefined') {
+                    this.model.set('closed', !converse.show_controlbox_by_default);
+                }
                 if (!this.model.get('closed')) {
                 if (!this.model.get('closed')) {
                     this.show();
                     this.show();
                 } else {
                 } else {

+ 1 - 0
docs/CHANGES.md

@@ -2,6 +2,7 @@
 
 
 ## 0.10.2 (Unreleased)
 ## 0.10.2 (Unreleased)
 
 
+- #261 show_controlbox_by_default config not working [diditopher]
 - #573 xgettext build error: `'javascript' unknown`
 - #573 xgettext build error: `'javascript' unknown`
 
 
 ## 0.10.1 (2016-02-06)
 ## 0.10.1 (2016-02-06)