Page MenuHomePhorge

D112.1732325185.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D112.1732325185.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
@@ -218,6 +218,11 @@
objectName: 'timeIndicator'
visible: !compactMode && !event.isLocalEcho
text: event.formattedTime
+ ToolTip.text: event.formattedDateTime
+ ToolTip.delay: 1000
+ ToolTip.timeout: 5000
+ 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
Fri, Nov 22, 5:26 PM (4 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39037
Default Alt Text
D112.1732325185.diff (1 KB)

Event Timeline