1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-23 22:36:32 +02:00

Mobile: Improve sync by reducing how often note list is sorted

This commit is contained in:
Laurent Cozic
2024-01-03 18:02:05 +00:00
parent 164e53ee7d
commit f95ee689fd
4 changed files with 43 additions and 12 deletions

View File

@@ -24,7 +24,7 @@ import { splitCommandString } from '@joplin/utils';
import { reg } from './registry';
import time from './time';
import BaseSyncTarget from './BaseSyncTarget';
const reduxSharedMiddleware = require('./components/shared/reduxSharedMiddleware');
import reduxSharedMiddleware from './components/shared/reduxSharedMiddleware';
const os = require('os');
import dns = require('dns');
import fs = require('fs-extra');
@@ -423,7 +423,7 @@ export default class BaseApplication {
let refreshNotesUseSelectedNoteId = false;
let refreshNotesHash = '';
await reduxSharedMiddleware(store, next, action);
await reduxSharedMiddleware(store, next, action, ((action: any) => { this.dispatch(action); }) as any);
const newState = store.getState() as State;
if (this.hasGui() && ['NOTE_UPDATE_ONE', 'NOTE_DELETE', 'FOLDER_UPDATE_ONE', 'FOLDER_DELETE'].indexOf(action.type) >= 0) {