1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

Mobile: Display decryption progress in side bar

This commit is contained in:
Laurent Cozic
2018-06-10 17:43:24 +01:00
parent 423d880b92
commit f6ee5dd0e7
3 changed files with 47 additions and 9 deletions

View File

@ -31,6 +31,11 @@ const defaultState = {
startState: 'idle',
port: null,
},
decryptionWorker: {
state: 'idle',
itemIndex: 0,
itemCount: 0,
},
};
const stateUtils = {};
@ -538,7 +543,18 @@ const reducer = (state = defaultState, action) => {
if ('startState' in action) clipperServer.startState = action.startState;
if ('port' in action) clipperServer.port = action.port;
newState.clipperServer = clipperServer;
break;
break;
case 'DECRYPTION_WORKER_SET':
newState = Object.assign({}, state);
const decryptionWorker = Object.assign({}, newState.decryptionWorker);
for (var n in action) {
if (!action.hasOwnProperty(n) || n === 'type') continue;
decryptionWorker[n] = action[n];
}
newState.decryptionWorker = decryptionWorker;
break;
}
} catch (error) {