parent
f8903f493f
commit
43d2ebc095
9 changed files with 24 additions and 19 deletions
|
|
@ -112,7 +112,7 @@ CreateRoom::CreateRoom(QWidget *parent)
|
|||
});
|
||||
|
||||
connect(visibilityCombo_,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated),
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentTextChanged),
|
||||
[this](const QString &text) {
|
||||
if (text == "Private") {
|
||||
request_.visibility = mtx::requests::Visibility::Private;
|
||||
|
|
@ -122,7 +122,7 @@ CreateRoom::CreateRoom(QWidget *parent)
|
|||
});
|
||||
|
||||
connect(presetCombo_,
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::activated),
|
||||
static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentTextChanged),
|
||||
[this](const QString &text) {
|
||||
if (text == "Private Chat") {
|
||||
request_.preset = mtx::requests::Preset::PrivateChat;
|
||||
|
|
|
|||
|
|
@ -75,15 +75,17 @@ ReceiptItem::dateFormat(const QDateTime &then) const
|
|||
auto days = then.daysTo(now);
|
||||
|
||||
if (days == 0)
|
||||
return tr("Today %1").arg(then.time().toString(Qt::DefaultLocaleShortDate));
|
||||
return tr("Today %1")
|
||||
.arg(QLocale::system().toString(then.time(), QLocale::ShortFormat));
|
||||
else if (days < 2)
|
||||
return tr("Yesterday %1").arg(then.time().toString(Qt::DefaultLocaleShortDate));
|
||||
return tr("Yesterday %1")
|
||||
.arg(QLocale::system().toString(then.time(), QLocale::ShortFormat));
|
||||
else if (days < 7)
|
||||
return QString("%1 %2")
|
||||
.arg(then.toString("dddd"))
|
||||
.arg(then.time().toString(Qt::DefaultLocaleShortDate));
|
||||
.arg(QLocale::system().toString(then.time(), QLocale::ShortFormat));
|
||||
|
||||
return then.toString(Qt::DefaultLocaleShortDate);
|
||||
return QLocale::system().toString(then.time(), QLocale::ShortFormat);
|
||||
}
|
||||
|
||||
ReadReceipts::ReadReceipts(QWidget *parent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue