diff options
author | Christian Rocha <christian@rocha.is> | 2020-07-17 12:25:40 -0400 |
---|---|---|
committer | Christian Muehlhaeuser <muesli@gmail.com> | 2020-10-05 13:50:04 +0200 |
commit | 3b3bf684f9e0f48fb84bc2ba7308d1331a7e6d38 (patch) | |
tree | 7ac2aad218383f831452af2b89cbbab424c07cee /ui/stash.go | |
parent | a35d83d5d25dc4ebf4d8545866a156403ca06e75 (diff) |
Detect when stash and news loading fails (and update the UI accordingly)
Diffstat (limited to 'ui/stash.go')
-rw-r--r-- | ui/stash.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/stash.go b/ui/stash.go index f96d4f2..ccfb169 100644 --- a/ui/stash.go +++ b/ui/stash.go @@ -219,6 +219,16 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) { case errMsg: m.err = msg + case stashLoadErrMsg: + m.err = msg.err + m.loaded |= loadedStash // still done, albeit unsuccessfully + m.stashFullyLoaded = true + m.loadingFromNetwork = false + + case newsLoadErrMsg: + m.err = msg.err + m.loaded |= loadedNews // still done, albeit unsuccessfully + // We're finished searching for local files case localFileSearchFinished: m.loaded |= loadedLocalFiles |