remove value from event call

This commit is contained in:
Ramon Souza 2021-08-09 11:06:33 -03:00
parent 3e66eb42db
commit e1f6f64ecf
2 changed files with 3 additions and 5 deletions

View File

@ -35,9 +35,7 @@ class IntlStartup extends Component {
Settings.application.isRTL = false;
}
Session.set('isLargeFont', LARGE_FONT_LANGUAGES.includes(localeName.substring(0, 2)));
const localeChangedEvent = new Event('localeChanged')
localeChangedEvent.isRTL = Settings.application.isRTL;
window.dispatchEvent(localeChangedEvent);
window.dispatchEvent(new Event('localeChanged'));
Settings.save();
}

View File

@ -192,10 +192,10 @@ class App extends Component {
this.handleWindowResize();
window.addEventListener('resize', this.handleWindowResize, false);
window.addEventListener('localeChanged', (event) => {
window.addEventListener('localeChanged', () => {
layoutContextDispatch({
type: ACTIONS.SET_IS_RTL,
value: event.isRTL,
value: Settings.application.isRTL,
});
});
window.ondragover = (e) => { e.preventDefault(); };