mirror of
https://github.com/charmbracelet/glow
synced 2024-07-05 17:38:59 +00:00
Simplify code by removing else block
This commit is contained in:
parent
2d8f8c2d64
commit
e5ec06b3b9
13
ui/stash.go
13
ui/stash.go
|
@ -1236,13 +1236,12 @@ func (m stashModel) headerView() string {
|
|||
if m.filterState == filtering {
|
||||
if localCount+stashedCount+newsCount == 0 {
|
||||
return grayFg("Nothing found.")
|
||||
} else {
|
||||
if localCount > 0 {
|
||||
sections = append(sections, fmt.Sprintf("%d local", localCount))
|
||||
}
|
||||
if stashedCount > 0 {
|
||||
sections = append(sections, fmt.Sprintf("%d stashed", stashedCount))
|
||||
}
|
||||
}
|
||||
if localCount > 0 {
|
||||
sections = append(sections, fmt.Sprintf("%d local", localCount))
|
||||
}
|
||||
if stashedCount > 0 {
|
||||
sections = append(sections, fmt.Sprintf("%d stashed", stashedCount))
|
||||
}
|
||||
|
||||
for i := range sections {
|
||||
|
|
Loading…
Reference in New Issue
Block a user