diff options
author | Christian Rocha <christian@rocha.is> | 2020-07-14 19:18:38 -0400 |
---|---|---|
committer | Christian Muehlhaeuser <muesli@gmail.com> | 2020-10-05 13:49:47 +0200 |
commit | cb8f7fcd1965e2f004ec151b34f1e500b089b3c0 (patch) | |
tree | 4affe03074a72b67db02dde80bbb4eb5dcc18555 /ui | |
parent | ee058c48163e509e99df11a3b45db9a80a3a3140 (diff) |
Take note internally when the local file search is finished
Diffstat (limited to 'ui')
-rw-r--r-- | ui/stash.go | 6 |
1 files changed, 6 insertions, 0 deletions
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) |