summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLoren Burkholder <55629213+LorenDB@users.noreply.github.com>2021-07-30 07:56:25 -0400
committerGitHub <noreply@github.com>2021-07-30 07:56:25 -0400
commit3cb4209d7b3c6a0b8455f49b991b897adf302572 (patch)
tree84ce009b6885179d60de69d5082dd52dc6a98d05 /src
parentMove read receipts connection to allow for future pop-out room views (diff)
downloadnheko-3cb4209d7b3c6a0b8455f49b991b897adf302572.tar.xz
Reformat dates
Co-authored-by: DeepBlueV7.X <nicolas.werner@hotmail.de>
Diffstat (limited to 'src')
-rw-r--r--src/ReadReceiptsModel.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ReadReceiptsModel.cpp b/src/ReadReceiptsModel.cpp

index d8b7141f..562353a7 100644 --- a/src/ReadReceiptsModel.cpp +++ b/src/ReadReceiptsModel.cpp
@@ -106,13 +106,14 @@ ReadReceiptsModel::dateFormat(const QDateTime &then) const auto days = then.daysTo(now); if (days == 0) - return tr("Today %1") + return tr("Today, %1") .arg(QLocale::system().toString(then.time(), QLocale::ShortFormat)); else if (days < 2) - return tr("Yesterday %1") + return tr("Yesterday, %1") .arg(QLocale::system().toString(then.time(), QLocale::ShortFormat)); else if (days < 7) - return QString("%1 %2") + //: %1 is the name of the current day, %2 is the time the read receipt was read. The result may look like this: Monday, 7:15 + return QString("%1, %2") .arg(then.toString("dddd")) .arg(QLocale::system().toString(then.time(), QLocale::ShortFormat));