From cb8f7fcd1965e2f004ec151b34f1e500b089b3c0 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 14 Jul 2020 19:18:38 -0400 Subject: [PATCH] Take note internally when the local file search is finished --- ui/stash.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ui/stash.go b/ui/stash.go index 0625343..51fdf93 100644 --- a/ui/stash.go +++ b/ui/stash.go @@ -103,6 +103,7 @@ func (s stashLoadedState) done() bool { const ( loadedStash stashLoadedState = 1 << iota loadedNews + loadedLocalFiles ) type stashModel struct { @@ -232,6 +233,10 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) { } cmds = append(cmds, findNextLocalFile(m)) + // We're finished searching for local files + case localFileSearchFinished: + m.loaded |= loadedLocalFiles + // Stash results have come in from the server case gotStashMsg: m.loading = false @@ -249,6 +254,7 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) { m.state = stashStateReady } + // News has come in from the server case gotNewsMsg: if len(msg) > 0 { docs := wrapMarkdowns(newsMarkdown, msg)