Inline the Toolbar._localized method in the 'localized' event handler

Considering just how small/simple this code is, it doesn't seem necessary to have a separate method for it (even more so when there's only one call-site).
This commit is contained in:
Jonas Jenwald 2019-11-17 14:02:33 +01:00
parent eaa2e216f4
commit 07473e9e2a

View File

@ -152,16 +152,12 @@ class Toolbar {
scaleSelect.oncontextmenu = noContextMenuHandler;
this.eventBus.on('localized', () => {
this._localized();
this._wasLocalized = true;
this._adjustScaleWidth();
this._updateUIState(true);
});
}
_localized() {
this._wasLocalized = true;
this._adjustScaleWidth();
this._updateUIState(true);
}
_updateUIState(resetNumPages = false) {
if (!this._wasLocalized) {
// Don't update the UI state until we localize the toolbar.