diff options
Diffstat (limited to 'src/content/controllers/FindController.ts')
-rw-r--r-- | src/content/controllers/FindController.ts | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/content/controllers/FindController.ts b/src/content/controllers/FindController.ts index 3087d5d..adcdb0d 100644 --- a/src/content/controllers/FindController.ts +++ b/src/content/controllers/FindController.ts @@ -1,20 +1,19 @@ import { injectable } from "tsyringe"; -import * as messages from "../../shared/messages"; import FindUseCase from "../usecases/FindUseCase"; @injectable() export default class FindController { constructor(private findUseCase: FindUseCase) {} - async start(m: messages.ConsoleEnterFindMessage): Promise<void> { - await this.findUseCase.startFind(m.text); + findNext(keyword: string): boolean { + return this.findUseCase.findNext(keyword); } - async next(_: messages.FindNextMessage): Promise<void> { - await this.findUseCase.findNext(); + findPrev(keyword: string): boolean { + return this.findUseCase.findPrev(keyword); } - async prev(_: messages.FindPrevMessage): Promise<void> { - await this.findUseCase.findPrev(); + clearSelection() { + return this.findUseCase.clearSelection(); } } |