2022-03-21 21:18:51 +00:00
|
|
|
package statusline
|
|
|
|
|
|
|
|
type folderState struct {
|
|
|
|
Search string
|
|
|
|
Filter string
|
|
|
|
FilterActivity string
|
2022-03-24 22:12:16 +00:00
|
|
|
Sorting string
|
2022-03-21 21:18:51 +00:00
|
|
|
|
|
|
|
Threading string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (fs *folderState) State() []string {
|
|
|
|
var line []string
|
|
|
|
|
|
|
|
if fs.FilterActivity != "" {
|
|
|
|
line = append(line, fs.FilterActivity)
|
|
|
|
} else {
|
|
|
|
if fs.Filter != "" {
|
|
|
|
line = append(line, fs.Filter)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if fs.Search != "" {
|
|
|
|
line = append(line, fs.Search)
|
|
|
|
}
|
2022-03-24 22:12:16 +00:00
|
|
|
if fs.Sorting != "" {
|
|
|
|
line = append(line, fs.Sorting)
|
|
|
|
}
|
2022-03-21 21:18:51 +00:00
|
|
|
if fs.Threading != "" {
|
|
|
|
line = append(line, fs.Threading)
|
|
|
|
}
|
|
|
|
return line
|
|
|
|
}
|