1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-23 18:53:36 +02:00
This commit is contained in:
Laurent Cozic 2019-10-30 09:54:32 +00:00
parent 0386534b3a
commit 33b8da98af
2 changed files with 4 additions and 7 deletions

View File

@ -77,10 +77,9 @@ class Command extends BaseCommand {
}
} else if (command == 'notetags') {
if (args.tag) {
let note = await app().loadItems(BaseModel.TYPE_NOTE, args.tag);
if (note.length < 1) throw new Error(_('Cannot find note with id "%s".', args.tag));
if (note.length > 1) throw new Error(_('Multiple notes match the id "%s". Please be more specific', args.tag));
let tags = await Tag.tagsByNoteId(note[0].id);
const note = await app().loadItem(BaseModel.TYPE_NOTE, args.tag);
if (!note) throw new Error(_('Cannot find "%s".', args.tag));
const tags = await Tag.tagsByNoteId(note.id);
tags.map(tag => {
this.stdout(tag.title);
});
@ -88,7 +87,7 @@ class Command extends BaseCommand {
throw new Error(_('Missing required argument: note'));
}
} else {
throw new Error(_('Invalid command: "%s"', command));
throw new Error(_('Cannot find "%s".', ''));
}
}
}

View File

@ -293,8 +293,6 @@
}
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
// 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