From: Scott Worley Date: Thu, 10 Feb 2022 00:30:02 +0000 (-0800) Subject: resetView X-Git-Url: http://git.scottworley.com/vopamoi/commitdiff_plain/58b569ce38e1d658d0cdfb31d53f2cad2d00e5bd?ds=inline;hp=5800003c2aef2d94e7225ef54c7e6eb782ac8514 resetView --- diff --git a/vopamoi.ts b/vopamoi.ts index 8cdc71f..931505b 100644 --- a/vopamoi.ts +++ b/vopamoi.ts @@ -452,6 +452,10 @@ function BrowserUI() { ui.removeTag(target.parentElement!.getAttribute("data-created")!, target.textContent!); }, + resetView: function () { + this.setView("todo"); + }, + returnFocusAfterInput: function (): boolean { if (taskFocusedBeforeJumpingToInput) { taskFocusedBeforeJumpingToInput.focus(); @@ -580,7 +584,7 @@ function handleKey(event: any) { if (event.key == "d") return browserUI.setView("done"); if (event.key == "q") return browserUI.setView("todo"); if (event.key == "s") return (inputState = InputState.VS); - if (event.key == "v") return browserUI.setView("todo"); + if (event.key == "v") return browserUI.resetView(); if (event.key == "w") return browserUI.setView("waiting"); if (event.key == "x") return browserUI.setView("deleted"); } else if (inputState === InputState.VS) {