Fix language selection using [...] button

Introduced in I740600d18859422b2f98a5ef92d0321f6e9615a2.

When onSelect was called for the new language, it set dirty to true.
Then the, now delayed, render function reset the dirty status to false.

There is no need to set dirty to false on render, so moved it to the
constructor.

Change-Id: Ibfa23f545c9d358e7e03fb299c238182ea449d7c
This commit is contained in:
Niklas Laxström
2020-10-28 09:28:40 +01:00
parent 5ce38ab35c
commit 094c30bc1c

View File

@@ -110,6 +110,7 @@
this.$webfonts = null; this.$webfonts = null;
this.$parent = $parent; this.$parent = $parent;
this.savedRegistry = $.extend( true, {}, mw.webfonts.preferences ); this.savedRegistry = $.extend( true, {}, mw.webfonts.preferences );
this.dirty = false;
} }
DisplaySettings.prototype = { DisplaySettings.prototype = {
@@ -157,7 +158,6 @@
// might not be. // might not be.
this.preview( this.uiLanguage ); this.preview( this.uiLanguage );
this.listen(); this.listen();
this.dirty = false;
}, },
prepareWebfontsCheckbox: function () { prepareWebfontsCheckbox: function () {