mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-23 18:53:36 +02:00
Clean up
This commit is contained in:
parent
0386534b3a
commit
33b8da98af
@ -77,10 +77,9 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
} else if (command == 'notetags') {
|
} else if (command == 'notetags') {
|
||||||
if (args.tag) {
|
if (args.tag) {
|
||||||
let note = await app().loadItems(BaseModel.TYPE_NOTE, args.tag);
|
const note = await app().loadItem(BaseModel.TYPE_NOTE, args.tag);
|
||||||
if (note.length < 1) throw new Error(_('Cannot find note with id "%s".', args.tag));
|
if (!note) throw new Error(_('Cannot find "%s".', args.tag));
|
||||||
if (note.length > 1) throw new Error(_('Multiple notes match the id "%s". Please be more specific', args.tag));
|
const tags = await Tag.tagsByNoteId(note.id);
|
||||||
let tags = await Tag.tagsByNoteId(note[0].id);
|
|
||||||
tags.map(tag => {
|
tags.map(tag => {
|
||||||
this.stdout(tag.title);
|
this.stdout(tag.title);
|
||||||
});
|
});
|
||||||
@ -88,7 +87,7 @@ class Command extends BaseCommand {
|
|||||||
throw new Error(_('Missing required argument: note'));
|
throw new Error(_('Missing required argument: note'));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Error(_('Invalid command: "%s"', command));
|
throw new Error(_('Cannot find "%s".', ''));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -293,8 +293,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
contentElement.addEventListener('scroll', webviewLib.logEnabledEventHandler(e => {
|
contentElement.addEventListener('scroll', webviewLib.logEnabledEventHandler(e => {
|
||||||
console.info('contentElement.scroll', lastScrollEventTime);
|
|
||||||
|
|
||||||
// If the last scroll event was done by the user, lastScrollEventTime is set and
|
// If the last scroll event was done by the user, lastScrollEventTime is set and
|
||||||
// we can use that to skip the event handling. We skip it because in that case
|
// we can use that to skip the event handling. We skip it because in that case
|
||||||
// the scroll position has already been updated. Also we add a 200ms interval
|
// the scroll position has already been updated. Also we add a 200ms interval
|
||||||
|
Loading…
x
Reference in New Issue
Block a user