mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-05-08 14:33:23 +00:00
feat: add timestamp to news list page (#2050)
This commit is contained in:
@@ -30,7 +30,7 @@ QVariant NewsModel::data(const QModelIndex &index, int role) const
|
||||
case IdRole: return item.id;
|
||||
case TitleRole: return item.title;
|
||||
case ContentRole: return item.content;
|
||||
case TimestampRole: return item.timestamp.toString(Qt::ISODate);
|
||||
case TimestampRole: return item.timestamp.toLocalTime().toString(Qt::ISODate);
|
||||
case IsReadRole: return item.read;
|
||||
case IsProcessedRole: return index.row() == m_processedIndex;
|
||||
default: return QVariant();
|
||||
|
||||
@@ -65,6 +65,7 @@ PageType {
|
||||
leftImageSource: read ? "" : "qrc:/images/controls/unread-dot.svg"
|
||||
isSmallLeftImage: !read
|
||||
text: title
|
||||
descriptionText: Qt.formatDateTime(timestamp, "dd.MM.yyyy HH:mm")
|
||||
rightImageSource: "qrc:/images/controls/chevron-right.svg"
|
||||
|
||||
clickedFunction: function() {
|
||||
|
||||
Reference in New Issue
Block a user