If we're offline disable the news section

This commit is contained in:
Christian Rocha 2020-11-25 21:33:44 -05:00
commit 2748e75165
2 changed files with 5 additions and 1 deletions

View file

@ -613,6 +613,10 @@ func (m *stashModel) handleDocumentBrowsing(msg tea.Msg) tea.Cmd {
// Show news
case "n":
if m.general.authStatus == authFailed {
// If we're offline disable the news section
return nil
}
if m.state == stashStateShowNews {
// Exit news
m.state = stashStateReady

View file

@ -147,8 +147,8 @@ type general struct {
type model struct {
general *general
keygenState keygenState
state state
keygenState keygenState
fatalErr error
// Sub-models