1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Fixed switching of locale

This commit is contained in:
Laurent Cozic 2017-11-03 18:51:13 +00:00
parent 1c144c9674
commit 28dcdc8984
3 changed files with 11 additions and 1 deletions

View File

@ -358,6 +358,7 @@ The following commands are available in [command-line mode](#command-line-mode):
# Known bugs
- Non-alphabetical characters such as Chinese or Arabic might create glitches in the user interface on Windows. This is a limitation of the current Windows console.
- In the React Native app, changing the notebook of a note sometimes has no effect, due to [this bug](https://github.com/facebook/react-native/issues/15556).
# License

View File

@ -138,7 +138,7 @@ reg.syncHasAuth = (syncTargetId) => {
}
reg.scheduleSync = async (delay = null) => {
if (delay === null) delay = 1000 * 10;
if (delay === null) delay = 1000 * 3;
if (reg.scheduleSyncId_) {
clearTimeout(reg.scheduleSyncId_);
@ -147,6 +147,11 @@ reg.scheduleSync = async (delay = null) => {
reg.logger().info('Scheduling sync operation...');
// if (Setting.value('env') === 'dev') {
// reg.logger().info('Scheduling sync operation DISABLED!!!');
// return;
// }
const timeoutCallback = async () => {
reg.scheduleSyncId_ = null;
reg.logger().info('Doing scheduled sync');

View File

@ -54,6 +54,10 @@ const generalMiddleware = store => next => async (action) => {
reg.setupRecurrentSync();
}
if (action.type == 'SETTINGS_UPDATE_ONE' && action.key == 'locale' || action.type == 'SETTINGS_UPDATE_ALL') {
setLocale(Setting.value('locale'));
}
if (action.type == 'NAV_GO' && action.routeName == 'Notes') {
Setting.setValue('activeFolderId', newState.selectedFolderId);
}