mirror of
https://github.com/muesli/telephant
synced 2024-11-13 23:37:11 +00:00
Don't show elapsed time for posts less than a minute old
This commit is contained in:
parent
2c5d731cd4
commit
2e6b539d9e
1 changed files with 3 additions and 0 deletions
|
@ -192,6 +192,9 @@ func (m *MessageModel) data(index *core.QModelIndex, role int) *core.QVariant {
|
|||
}
|
||||
case CreatedAt:
|
||||
{
|
||||
if time.Since(p.CreatedAt) < time.Minute {
|
||||
return core.NewQVariant1("just now")
|
||||
}
|
||||
return core.NewQVariant1(humanize.Time(p.CreatedAt))
|
||||
}
|
||||
case Actor:
|
||||
|
|
Loading…
Reference in a new issue