MCPcopy Create free account
hub / github.com/DTStack/molecule / initView

Method initView

src/controller/settings.tsx:51–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49 }, 600);
50
51 public initView() {
52 const { SETTING_ID } = this.builtinService.getConstants();
53 this.editorService.onUpdateTab((tab) => {
54 if (tab.id === SETTING_ID) {
55 const settingsValue = this.settingsService.normalizeFlatObject(
56 tab.data?.value || ''
57 );
58 this.onChangeSettings(settingsValue);
59 }
60 });
61 this.localeService.onChange((prev: ILocale, next: ILocale) => {
62 this.notifyLocaleChanged(prev, next);
63 });
64 }
65
66 private notifyLocaleChanged(prev: ILocale, next: ILocale) {
67 const { SETTING_ID } = this.builtinService.getConstants();

Callers

nothing calls this directly

Calls 6

notifyLocaleChangedMethod · 0.95
getConstantsMethod · 0.65
onUpdateTabMethod · 0.65
normalizeFlatObjectMethod · 0.65
onChangeSettingsMethod · 0.65
onChangeMethod · 0.65

Tested by

no test coverage detected