Limit bookmark items on completion

jh-changes
Shin'ya Ueoka 6 years ago
parent 7f2fab55a5
commit b7ed6eb254
  1. 3
      src/background/usecases/completions.js

@ -183,7 +183,8 @@ export default class CompletionsInteractor {
async queryBookmarkItems(name, keywords) {
let bookmarks = await this.completionRepository.queryBookmarks(keywords);
return bookmarks.map(page => new CompletionItem({
return bookmarks.slice(0, COMPLETION_ITEM_LIMIT)
.map(page => new CompletionItem({
caption: page.title,
content: name + ' ' + page.url,
url: page.url