mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Add Activity date and time
Signed-off-by: Michael Schuster <michael@schuster.ms>
This commit is contained in:
parent
c9719f44dc
commit
889cb636d3
@ -51,6 +51,7 @@ QHash<int, QByteArray> ActivityListModel::roleNames() const
|
||||
roles[ActionIconRole] = "icon";
|
||||
roles[ActionTextRole] = "subject";
|
||||
roles[ObjectTypeRole] = "objectType";
|
||||
roles[PointInTimeRole] = "dateTime";
|
||||
return roles;
|
||||
}
|
||||
|
||||
@ -184,7 +185,7 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
|
||||
case AccountRole:
|
||||
return a._accName;
|
||||
case PointInTimeRole:
|
||||
return QString("%1 (%2)").arg(a._dateTime.toLocalTime().toString(Qt::DefaultLocaleShortDate), Utility::timeAgoInWords(a._dateTime.toLocalTime()));
|
||||
return QString("%1 - %2").arg(Utility::timeAgoInWords(a._dateTime.toLocalTime()), a._dateTime.toLocalTime().toString(Qt::DefaultLocaleShortDate));
|
||||
case AccountConnectedRole:
|
||||
return (ast && ast->isConnected());
|
||||
default:
|
||||
|
||||
@ -538,6 +538,16 @@ Window {
|
||||
elide: Text.ElideRight
|
||||
font.pixelSize: 10
|
||||
}
|
||||
|
||||
Text {
|
||||
id: activityTextDateTime
|
||||
text: dateTime
|
||||
height: (text === "") ? 0 : activityTextTitle.height
|
||||
width: 240 + ((path === "") ? activityItem.height : 0) + ((link === "") ? activityItem.height : 0) - 8
|
||||
elide: Text.ElideRight
|
||||
font.pixelSize: 10
|
||||
color: "#808080"
|
||||
}
|
||||
}
|
||||
Item {
|
||||
id: activityItemFiller
|
||||
|
||||
Loading…
Reference in New Issue
Block a user