mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-28 09:41:29 +08:00
Bugfix: addEventListener('rl-view-model') missing for Settings #1013
This commit is contained in:
parent
7968518f9c
commit
ffde5ddfb3
1 changed files with 6 additions and 1 deletions
|
@ -2,7 +2,7 @@ import ko from 'ko';
|
|||
|
||||
import { pString } from 'Common/Utils';
|
||||
import { settings } from 'Common/Links';
|
||||
import { createElement/*, elementById*/ } from 'Common/Globals';
|
||||
import { createElement/*, elementById*/, fireEvent } from 'Common/Globals';
|
||||
|
||||
import { AbstractScreen } from 'Knoin/AbstractScreen';
|
||||
import { i18nToNodes } from 'Common/Translator';
|
||||
|
@ -44,10 +44,13 @@ export class AbstractSettingsScreen extends AbstractScreen {
|
|||
|
||||
settingsScreen = new SettingsViewModelClass();
|
||||
settingsScreen.viewModelDom = viewModelDom;
|
||||
settingsScreen.viewModelTemplateID = RoutedSettingsViewModel.template;
|
||||
|
||||
SettingsViewModelClass.__dom = viewModelDom;
|
||||
SettingsViewModelClass.__vm = settingsScreen;
|
||||
|
||||
fireEvent('rl-view-model.create', settingsScreen);
|
||||
|
||||
ko.applyBindingAccessorsToNode(
|
||||
viewModelDom,
|
||||
{
|
||||
|
@ -57,6 +60,8 @@ export class AbstractSettingsScreen extends AbstractScreen {
|
|||
);
|
||||
|
||||
settingsScreen.onBuild?.(viewModelDom);
|
||||
|
||||
fireEvent('rl-view-model', settingsScreen);
|
||||
} else {
|
||||
console.log('Cannot find sub settings view model position: SettingsSubScreen');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue