Page MenuHomePhorge

D112.1732488891.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D112.1732488891.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
Sun, Nov 24, 2:54 PM (12 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39895
Default Alt Text
D112.1732488891.diff (1 KB)

Event Timeline