make date column header in table depend on mode
This commit is contained in:
parent
9b87c02744
commit
84e0c9c926
|
@ -94,10 +94,18 @@ func newModel(fls []files.File, width, height int, readonly, preselected, once b
|
|||
|
||||
rows := mdl.freshRows(preselected)
|
||||
|
||||
var datecolumn string
|
||||
switch mdl.mode {
|
||||
case modes.Trashing:
|
||||
datecolumn = "modified"
|
||||
default:
|
||||
datecolumn = "trashed"
|
||||
}
|
||||
|
||||
columns := []table.Column{
|
||||
{Title: "filename", Width: fwidth},
|
||||
{Title: "path", Width: owidth},
|
||||
{Title: "modified", Width: dwidth},
|
||||
{Title: datecolumn, Width: dwidth},
|
||||
{Title: "size", Width: swidth},
|
||||
}
|
||||
if !mdl.readonly {
|
||||
|
|
Loading…
Reference in a new issue