2022-03-21 22:18:51 +01:00
|
|
|
package statusline
|
|
|
|
|
|
|
|
type folderState struct {
|
|
|
|
Search string
|
|
|
|
Filter string
|
|
|
|
FilterActivity string
|
2022-03-24 23:12:16 +01:00
|
|
|
Sorting string
|
2022-03-21 22:18:51 +01: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 23:12:16 +01:00
|
|
|
if fs.Sorting != "" {
|
|
|
|
line = append(line, fs.Sorting)
|
|
|
|
}
|
2022-03-21 22:18:51 +01:00
|
|
|
if fs.Threading != "" {
|
|
|
|
line = append(line, fs.Threading)
|
|
|
|
}
|
|
|
|
return line
|
|
|
|
}
|