implemented @limit for search

This commit is contained in:
zadam
2019-04-22 18:08:33 +02:00
parent 15eaf67189
commit f273b4334e
8 changed files with 251 additions and 40 deletions

View File

@@ -376,6 +376,16 @@ eventService.subscribe([eventService.ENTITY_CHANGED, eventService.ENTITY_DELETED
}
});
/**
* @param noteId
* @returns {boolean} - true if note exists (is not deleted) and is not archived.
*/
function isAvailable(noteId) {
const notePath = getNotePath(noteId);
return !!notePath;
}
eventService.subscribe(eventService.ENTER_PROTECTED_SESSION, () => {
if (loaded) {
loadProtectedNotes();
@@ -388,5 +398,6 @@ module.exports = {
findNotes,
getNotePath,
getNoteTitleForPath,
isAvailable,
load
};