From a41151fd7546b6b61f657db2ae7a49cbb1010527 Mon Sep 17 00:00:00 2001 From: Jonathan Hope Date: Mon, 3 Jun 2024 18:32:20 -0700 Subject: [PATCH] fix: fixing some TUI bugs introduced in the refactor (#67) --- cmd/cli/internal/tui/views/booksview/books.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/cli/internal/tui/views/booksview/books.go b/cmd/cli/internal/tui/views/booksview/books.go index 6f9f1ef..1d4c72e 100644 --- a/cmd/cli/internal/tui/views/booksview/books.go +++ b/cmd/cli/internal/tui/views/booksview/books.go @@ -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) @@ -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()