Selaa lähdekoodia

Fix linting errors

JC Brand 5 vuotta sitten
vanhempi
commit
c6ac03e94e
3 muutettua tiedostoa jossa 8 lisäystä ja 9 poistoa
  1. 2 2
      src/converse-chatview.js
  2. 6 6
      src/converse-emoji-views.js
  3. 0 1
      src/headless/converse-core.js

+ 2 - 2
src/converse-chatview.js

@@ -26,7 +26,7 @@ import tpl_user_details_modal from "templates/user_details_modal.js";
 import xss from "xss/dist/xss";
 
 
-const { Backbone, Strophe, sizzle, dayjs } = converse.env;
+const { Strophe, sizzle, dayjs } = converse.env;
 const u = converse.env.utils;
 
 
@@ -721,7 +721,7 @@ converse.plugins.add('converse-chatview', {
              * Handler that gets called when a new message object is created.
              * @private
              * @method _converse.ChatBoxView#onMessageAdded
-             * @param { object } message - The message Backbone object that was added.
+             * @param { object } message - The message object that was added.
              */
             async onMessageAdded (message) {
                 const id = message.get('id');

+ 6 - 6
src/converse-emoji-views.js

@@ -86,7 +86,7 @@ converse.plugins.add('converse-emoji-views', {
                     'autocompleting': value,
                     'position': input.selectionStart
                 }, {'silent': true});
-                this.emoji_picker_view.filter(value, true);
+                this.emoji_picker_view.filter(value);
                 this.emoji_dropdown.toggle();
             },
 
@@ -158,7 +158,7 @@ converse.plugins.add('converse-emoji-views', {
                             'onCategoryPicked': ev => this.chooseCategory(ev),
                             'onSearchInputBlurred': ev => this.chatview.emitFocused(ev),
                             'onSearchInputKeyDown': ev => this.onKeyDown(ev),
-                            'onSearchInputFocus': ev => this.onSearchInputFocus(),
+                            'onSearchInputFocus': ev => this.onSearchInputFocus(ev),
                             'search_results': this.search_results,
                             'shouldBeHidden': shortname => this.shouldBeHidden(shortname),
                             'toned_emojis': _converse.emojis.toned,
@@ -222,7 +222,7 @@ converse.plugins.add('converse-emoji-views', {
                 this.navigator.disable();
             },
 
-            filter (value, set_property) {
+            filter (value) {
                 const old_query = this.model.get('query');
                 if (!value) {
                     this.search_results = [];
@@ -281,7 +281,7 @@ converse.plugins.add('converse-emoji-views', {
                 if (this.chatview.emoji_dropdown) {
                     this.chatview.emoji_dropdown.toggle();
                 }
-                this.filter('', true);
+                this.filter('');
                 this.disableArrowNavigation();
             },
 
@@ -327,7 +327,7 @@ converse.plugins.add('converse-emoji-views', {
                     if (ev.target.value) {
                         ev.preventDefault();
                         const match = find(_converse.emoji_shortnames, sn => _converse.FILTER_CONTAINS(sn, ev.target.value));
-                        match && this.filter(match, true);
+                        match && this.filter(match);
                     } else if (!this.navigator.enabled) {
                         this.enableArrowNavigation(ev);
                     }
@@ -413,7 +413,7 @@ converse.plugins.add('converse-emoji-views', {
                 this.model.set({'autocompleting': null, 'position': null});
                 this.chatview.insertIntoTextArea(target.getAttribute('data-emoji'), replace, false, position);
                 this.chatview.emoji_dropdown.toggle();
-                this.filter('', true);
+                this.filter('');
             }
         });
 

+ 0 - 1
src/headless/converse-core.js

@@ -359,7 +359,6 @@ _converse.createStore = function (id, storage) {
 }
 
 
-
 function initPlugins () {
     // If initialize gets called a second time (e.g. during tests), then we
     // need to re-apply all plugins (for a new converse instance), and we