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

Desktop: Move up and down in note list using arrow keys

This commit is contained in:
Laurent Cozic
2019-01-25 19:59:36 +00:00
parent 76b211eb6d
commit 998bdf3b56
3 changed files with 109 additions and 5 deletions

View File

@ -44,6 +44,13 @@ class BaseModel {
return null;
}
static modelIndexById(items, id) {
for (let i = 0; i < items.length; i++) {
if (items[i].id == id) return i;
}
return -1;
}
// Prefer the use of this function to compare IDs as it handles the case where
// one ID is null and the other is "", in which case they are actually considered to be the same.
static idsEqual(id1, id2) {