Skip to content

Commit

Permalink
fix: fixing some TUI bugs introduced in the refactor (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanHope committed Jun 4, 2024
1 parent bf95657 commit a41151f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/cli/internal/tui/views/booksview/books.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
var cmd tea.Cmd
m.query = ""
m.footer.StopInputMode()
m.header.SetFree()

if m.inputType == inputSearch {
cmd = m.getBooksCmd(msgs.DirectionStart)
Expand Down Expand Up @@ -435,14 +436,14 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
}

case "+":
if !m.table.Empty() && !m.header.Busy() {
if !m.header.Busy() {
m.inputType = inputFolder
m.footer.StartInputMode("Folder: ", "", 2048)
m.header.SetBusy()
}

case "b":
if !m.table.Empty() && !m.header.Busy() {
if !m.header.Busy() {
m.inputType = inputBookmark
m.footer.StartInputMode("Bookmark: ", "", 2048)
m.header.SetBusy()
Expand Down

0 comments on commit a41151f

Please sign in to comment.