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

Desktop: Toggle todo checkbox using SPACE key

This commit is contained in:
Laurent Cozic
2019-01-26 15:33:45 +00:00
parent fef176eb96
commit f62bbfe286
3 changed files with 58 additions and 16 deletions

View File

@ -51,6 +51,16 @@ class BaseModel {
return -1;
}
static modelsByIds(items, ids) {
const output = [];
for (let i = 0; i < items.length; i++) {
if (ids.indexOf(items[i].id) >= 0) {
output.push(items[i]);
}
}
return output;
}
// 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) {