From 66129a9eb2a33ab2955a620ee4cead298c73878f Mon Sep 17 00:00:00 2001 From: miruka Date: Sat, 7 Sep 2019 15:16:03 -0400 Subject: [PATCH] Remove seconds from message dates Makes them easier to read --- src/qml/Chat/Timeline/EventContent.qml | 7 ++++--- src/qml/utils.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/qml/Chat/Timeline/EventContent.qml b/src/qml/Chat/Timeline/EventContent.qml index d3efe5df..e1a96dd6 100644 --- a/src/qml/Chat/Timeline/EventContent.qml +++ b/src/qml/Chat/Timeline/EventContent.qml @@ -8,7 +8,7 @@ Row { spacing: theme.spacing / 1.25 readonly property string eventText: Utils.processedEventText(model) - readonly property string eventTime: Utils.formatTime(model.date) + readonly property string eventTime: Utils.formatTime(model.date, false) readonly property int eventTimeSpaces: 2 readonly property string hoveredLink: @@ -113,9 +113,10 @@ Row { text: theme.chat.message.styleInclude + eventContent.eventText + // time - " ".repeat(eventTimeSpaces) + + " ".repeat(eventTimeSpaces) + "" + + "px color=" + theme.chat.message.date + + ' style="vertical-align: middle">' + eventTime + "" + // local echo icon diff --git a/src/qml/utils.js b/src/qml/utils.js index 957ce869..5fcf5384 100644 --- a/src/qml/utils.js +++ b/src/qml/utils.js @@ -156,7 +156,7 @@ function formatTime(time, seconds=true) { seconds ? Locale.LongFormat : Locale.NarrowFormat ).replace(/\./g, ":").replace(/ t$/, "") // en_DK.UTF-8 locale wrongfully gives "." separators; - // remove the timezone at the end + // also remove the timezone at the end ) }