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)
|
rows := mdl.freshRows(preselected)
|
||||||
|
|
||||||
|
var datecolumn string
|
||||||
|
switch mdl.mode {
|
||||||
|
case modes.Trashing:
|
||||||
|
datecolumn = "modified"
|
||||||
|
default:
|
||||||
|
datecolumn = "trashed"
|
||||||
|
}
|
||||||
|
|
||||||
columns := []table.Column{
|
columns := []table.Column{
|
||||||
{Title: "filename", Width: fwidth},
|
{Title: "filename", Width: fwidth},
|
||||||
{Title: "path", Width: owidth},
|
{Title: "path", Width: owidth},
|
||||||
{Title: "modified", Width: dwidth},
|
{Title: datecolumn, Width: dwidth},
|
||||||
{Title: "size", Width: swidth},
|
{Title: "size", Width: swidth},
|
||||||
}
|
}
|
||||||
if !mdl.readonly {
|
if !mdl.readonly {
|
||||||
|
|
Loading…
Reference in a new issue