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

Method notifyLocaleChanged

src/controller/settings.tsx:66–80  ·  view source on GitHub ↗
(prev: ILocale, next: ILocale)

Source from the content-addressed store, hash-verified

64 }
65
66 private notifyLocaleChanged(prev: ILocale, next: ILocale) {
67 const { SETTING_ID } = this.builtinService.getConstants();
68 const notify = {
69 id: SETTING_ID!,
70 value: next,
71 render(value) {
72 /* istanbul ignore next */
73 return <LocaleNotification key={next.id} locale={next.name} />;
74 },
75 };
76 if (!this.notificationService.getState().showNotifications) {
77 this.notificationService.toggleNotification();
78 }
79 this.notificationService.add([notify]);
80 }
81}

Callers 1

initViewMethod · 0.95

Calls 4

getStateMethod · 0.80
getConstantsMethod · 0.65
toggleNotificationMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected