diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-29 20:07:23 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-29 20:07:23 +0900 |
commit | 68673957edad21700c58d252542a0aee04115d22 (patch) | |
tree | 7a58c00d82372a27b03fcbcdbf63d3fc7ec52c39 /src/background | |
parent | aea17a52d692310ac459410c7d6b4e0bfd5e0225 (diff) | |
parent | 698f905145755954647f91ae01f5966b9e35a91e (diff) |
Merge pull request #596 from ueokande/qa-0.23
QA 0.23
Diffstat (limited to 'src/background')
-rw-r--r-- | src/background/usecases/CompletionsUseCase.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/background/usecases/CompletionsUseCase.ts b/src/background/usecases/CompletionsUseCase.ts index 705555b..8cd4f32 100644 --- a/src/background/usecases/CompletionsUseCase.ts +++ b/src/background/usecases/CompletionsUseCase.ts @@ -38,6 +38,9 @@ export default class CompletionsUseCase { } async queryOpen(name: string, keywords: string): Promise<CompletionGroup[]> { + // TODO This logic contains view entities. They should be defined on + // content script + let settings = await this.settingRepository.get(); let groups: CompletionGroup[] = []; @@ -195,7 +198,7 @@ export default class CompletionsUseCase { .map(pages => filters.filterByPathname(pages, COMPLETION_ITEM_LIMIT)) .map(pages => filters.filterByOrigin(pages, COMPLETION_ITEM_LIMIT))[0] .sort((x: HistoryItem, y: HistoryItem): number => { - return Number(x.visitCount) - Number(y.visitCount); + return Number(y.visitCount) - Number(x.visitCount); }) .slice(0, COMPLETION_ITEM_LIMIT); return histories.map(page => ({ |