Simplify code by removing else block

This commit is contained in:
Christian Muehlhaeuser 2021-03-12 13:30:30 +01:00
parent 2d8f8c2d64
commit e5ec06b3b9
No known key found for this signature in database
GPG Key ID: 3CF9FA45CA1EBB7E

View File

@ -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 {