From 7b3c67341c1ebbc2e9e855f43ad653e6eaac0d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20B=C3=BCtow?= <1224732+snonux@users.noreply.github.com> Date: Sun, 22 Jun 2025 21:48:10 +0300 Subject: Add space hotkey to refresh task list --- internal/ui/table.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'internal') diff --git a/internal/ui/table.go b/internal/ui/table.go index 1ec7313..febb8ff 100644 --- a/internal/ui/table.go +++ b/internal/ui/table.go @@ -304,13 +304,13 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, blinkCmd() } return m, nil - case tea.KeyMsg: - // Ignore all key presses while a task is blinking to avoid - // accidentally modifying another task. - if m.blinkID != 0 { - return m, nil - } - if m.annotating { + case tea.KeyMsg: + // Ignore all key presses while a task is blinking to avoid + // accidentally modifying another task. + if m.blinkID != 0 { + return m, nil + } + if m.annotating { switch msg.Type { case tea.KeyEnter: if m.replaceAnnotations { @@ -738,6 +738,9 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { m.theme = m.defaultTheme m.applyTheme() return m, nil + case " ": + m.reload() + return m, nil case "/", "?": m.searching = true m.searchInput.SetValue("") @@ -874,6 +877,7 @@ func (m Model) View() string { "t: edit tags", "c: random theme", "C: reset theme", + "space: refresh tasks", "/, ?: search", "n/N: next/prev search match", "esc: close help/search", -- cgit v1.2.3