You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-02 22:49:09 +02:00
Various improvements on mobile app
This commit is contained in:
@@ -218,7 +218,7 @@ const reducer = (state = defaultState, action) => {
|
||||
|
||||
const modNote = action.note;
|
||||
|
||||
let newNotes = state.notes.splice(0);
|
||||
let newNotes = state.notes.slice();
|
||||
var found = false;
|
||||
for (let i = 0; i < newNotes.length; i++) {
|
||||
let n = newNotes[i];
|
||||
@@ -227,7 +227,13 @@ const reducer = (state = defaultState, action) => {
|
||||
if (!('parent_id' in modNote) || modNote.parent_id == n.parent_id) {
|
||||
// Merge the properties that have changed (in modNote) into
|
||||
// the object we already have.
|
||||
newNotes[i] = Object.assign(newNotes[i], action.note);
|
||||
newNotes[i] = Object.assign({}, newNotes[i]);
|
||||
|
||||
for (let n in modNote) {
|
||||
if (!modNote.hasOwnProperty(n)) continue;
|
||||
newNotes[i][n] = modNote[n];
|
||||
}
|
||||
|
||||
} else {
|
||||
newNotes.splice(i, 1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user