mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-24 09:04:18 +02:00
If we're offline disable the news section
This commit is contained in:
parent
fc898831af
commit
2748e75165
2 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
2
ui/ui.go
2
ui/ui.go
|
|
@ -147,8 +147,8 @@ type general struct {
|
|||
|
||||
type model struct {
|
||||
general *general
|
||||
keygenState keygenState
|
||||
state state
|
||||
keygenState keygenState
|
||||
fatalErr error
|
||||
|
||||
// Sub-models
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue