forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
6 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,11 @@ | ||
import ELECTRON_EVENTS from '../../../../desktop/ELECTRON_EVENTS'; | ||
import BaseLocaleListener from './BaseLocaleListener'; | ||
|
||
const connect = (callback) => { | ||
BaseLocaleListener.connect((val) => { | ||
callback(val); | ||
|
||
// Send the updated locale to the Electron main process | ||
window.electron.send(ELECTRON_EVENTS.LOCALE_UPDATED, val); | ||
}); | ||
}; | ||
const connect = () => { | ||
// Send the updated locale to the Electron main process | ||
BaseLocaleListener.connect(val => window.electron.send(ELECTRON_EVENTS.LOCALE_UPDATED, val)); | ||
}; | ||
|
||
const LocaleListener = { | ||
listenForLocaleChanges, | ||
export default { | ||
connect, | ||
}; | ||
|
||
export default LocaleListener; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,5 @@ | ||
import BaseLocaleListener from './BaseLocaleListener'; | ||
|
||
const listenForLocaleChanges = () => { | ||
BaseLocaleListener.connect(() => {}); | ||
export default { | ||
connect: BaseLocaleListener.connect, | ||
}; | ||
|
||
const LocaleListener = { | ||
listenForLocaleChanges, | ||
}; | ||
|
||
export default LocaleListener; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters