Page MenuHomePhorge

D112.1734852952.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D112.1734852952.diff

diff --git a/src/contents/ui/Bubble.qml b/src/contents/ui/Bubble.qml
--- a/src/contents/ui/Bubble.qml
+++ b/src/contents/ui/Bubble.qml
@@ -215,6 +215,11 @@
objectName: 'timeIndicator'
visible: !compactMode && !event.isLocalEcho
text: event.formattedTime
+ ToolTip.text: event.formattedDateTime
+ ToolTip.delay: Kirigami.Units.toolTipDelay
+ ToolTip.timeout: Helpers.toolTipTimeout
+ ToolTip.visible: hoverHandlerTime.hovered
+ HoverHandler { id: hoverHandlerTime }
font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.8
}
diff --git a/src/matrix-event.hpp b/src/matrix-event.hpp
--- a/src/matrix-event.hpp
+++ b/src/matrix-event.hpp
@@ -59,6 +59,7 @@
LAGER_QT_READER(QString, relationType);
LAGER_QT_READER(QString, relatedEventId);
LAGER_QT_READER(QString, formattedTime);
+ LAGER_QT_READER(QString, formattedDateTime);
LAGER_QT_READER(bool, isEdited);
Q_INVOKABLE MatrixEventReaderListModel *readers() const;
diff --git a/src/matrix-event.cpp b/src/matrix-event.cpp
--- a/src/matrix-event.cpp
+++ b/src/matrix-event.cpp
@@ -132,6 +132,15 @@
QLocale::ShortFormat
);
}))
+ , LAGER_QT(formattedDateTime)(m_event
+ .map(&Event::originServerTs)
+ .map([](Timestamp ts) {
+ auto locale = QLocale::system();
+ return locale.toString(
+ QDateTime::fromMSecsSinceEpoch(ts),
+ QLocale::ShortFormat
+ );
+ }))
, LAGER_QT(isEdited)(m_edits.map([](const auto &edits) { return !edits.empty(); }))
{
}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 11:35 PM (13 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
48324
Default Alt Text
D112.1734852952.diff (1 KB)

Event Timeline