mirror of
https://github.com/charmbracelet/glow
synced 2024-10-06 16:09:24 +00:00
Simplify code by removing else block
This commit is contained in:
parent
2d8f8c2d64
commit
e5ec06b3b9
|
@ -1236,14 +1236,13 @@ func (m stashModel) headerView() string {
|
||||||
if m.filterState == filtering {
|
if m.filterState == filtering {
|
||||||
if localCount+stashedCount+newsCount == 0 {
|
if localCount+stashedCount+newsCount == 0 {
|
||||||
return grayFg("Nothing found.")
|
return grayFg("Nothing found.")
|
||||||
} else {
|
}
|
||||||
if localCount > 0 {
|
if localCount > 0 {
|
||||||
sections = append(sections, fmt.Sprintf("%d local", localCount))
|
sections = append(sections, fmt.Sprintf("%d local", localCount))
|
||||||
}
|
}
|
||||||
if stashedCount > 0 {
|
if stashedCount > 0 {
|
||||||
sections = append(sections, fmt.Sprintf("%d stashed", stashedCount))
|
sections = append(sections, fmt.Sprintf("%d stashed", stashedCount))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
for i := range sections {
|
for i := range sections {
|
||||||
sections[i] = grayFg(sections[i])
|
sections[i] = grayFg(sections[i])
|
||||||
|
|
Loading…
Reference in a new issue