From 3b3bf684f9e0f48fb84bc2ba7308d1331a7e6d38 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Fri, 17 Jul 2020 12:25:40 -0400 Subject: Detect when stash and news loading fails (and update the UI accordingly) --- ui/stash.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ui/stash.go') 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 -- cgit v1.2.3