Explorar o código

Rename `hide_subject` to `subject_hidden`

JC Brand %!s(int64=5) %!d(string=hai) anos
pai
achega
5b5c4595cc

+ 3 - 3
src/converse-muc-views.js

@@ -1123,8 +1123,8 @@ converse.plugins.add('converse-muc-views', {
 
 
                 if (this.model.get('subject')) {
                 if (this.model.get('subject')) {
                     buttons.push({
                     buttons.push({
-                        'i18n_text': this.model.get('hide_subject') ? __('Show topic') : __('Hide topic'),
-                        'i18n_title': this.model.get('hide_subject') ?
+                        'i18n_text': this.model.get('subject_hidden') ? __('Show topic') : __('Hide topic'),
+                        'i18n_title': this.model.get('subject_hidden') ?
                             __('Show the topic message in the heading') :
                             __('Show the topic message in the heading') :
                             __('Hide the topic in the heading'),
                             __('Hide the topic in the heading'),
                         'handler': ev => this.toggleTopic(ev),
                         'handler': ev => this.toggleTopic(ev),
@@ -1171,7 +1171,7 @@ converse.plugins.add('converse-muc-views', {
             },
             },
 
 
             toggleTopic () {
             toggleTopic () {
-                this.model.save('hide_subject', !this.model.get('hide_subject'));
+                this.model.save('subject_hidden', !this.model.get('subject_hidden'));
             },
             },
 
 
 
 

+ 1 - 1
src/headless/converse-muc.js

@@ -1568,7 +1568,7 @@ converse.plugins.add('converse-muc', {
                     // MUST NOT contain a <body/> element (or a <thread/> element).
                     // MUST NOT contain a <body/> element (or a <thread/> element).
                     u.safeSave(this, {
                     u.safeSave(this, {
                         'subject': {'author': attrs.nick, 'text': attrs.subject || ''},
                         'subject': {'author': attrs.nick, 'text': attrs.subject || ''},
-                        'hide_subject': attrs.subject ? false : this.get('hide_subject')
+                        'subject_hidden': attrs.subject ? false : this.get('subject_hidden')
                     });
                     });
                     return true;
                     return true;
                 }
                 }

+ 1 - 1
src/templates/chatroom_head.js

@@ -15,7 +15,7 @@ const tpl_standalone_btns = (o) => o.standalone_btns.reverse().map(b => until(b,
 
 
 export default (o) => {
 export default (o) => {
     const subject = o.subject ? u.addHyperlinks(xss.filterXSS(o.subject.text, {'whiteList': {}})) : '';
     const subject = o.subject ? u.addHyperlinks(xss.filterXSS(o.subject.text, {'whiteList': {}})) : '';
-    const show_subject = (subject && !o.hide_subject);
+    const show_subject = (subject && !o.subject_hidden);
     return html`
     return html`
         <div class="chatbox-title ${ show_subject ? '' :  "chatbox-title--no-desc"}">
         <div class="chatbox-title ${ show_subject ? '' :  "chatbox-title--no-desc"}">
             ${ (o._converse.standalone) ? html`<div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>` : '' }
             ${ (o._converse.standalone) ? html`<div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>` : '' }