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

Mobile: Fixed handling of provisional notes

This commit is contained in:
Laurent Cozic
2020-03-06 18:49:30 +00:00
parent 972e5aed8a
commit 51ce7c939d
5 changed files with 55 additions and 41 deletions

View File

@ -29,10 +29,11 @@ const reduxSharedMiddleware = async function(store, next, action) {
refreshTags = true;
}
if (action.type === 'NOTE_SELECT') {
if (action.type === 'NOTE_SELECT' || action.type === 'NAV_BACK') {
const noteIds = newState.provisionalNoteIds.slice();
for (const noteId of noteIds) {
if (action.id === noteId) continue;
reg.logger().info('Provisional was not modified - deleting it');
await Note.delete(noteId);
}
}