mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 23:24:01 +02:00
fix: check time before appending
This commit is contained in:
parent
11abaac7c1
commit
39e3fcb553
1 changed files with 10 additions and 8 deletions
|
@ -1163,6 +1163,7 @@ void HistoryItem::setServiceText(PreparedServiceText &&prepared) {
|
||||||
auto text = std::move(prepared.text);
|
auto text = std::move(prepared.text);
|
||||||
|
|
||||||
const auto settings = &AyuSettings::getInstance();
|
const auto settings = &AyuSettings::getInstance();
|
||||||
|
if (date() > 0) {
|
||||||
const auto timeString = QString(" (%1)").arg(QLocale().toString(
|
const auto timeString = QString(" (%1)").arg(QLocale().toString(
|
||||||
base::unixtime::parse(_date),
|
base::unixtime::parse(_date),
|
||||||
settings->showMessageSeconds
|
settings->showMessageSeconds
|
||||||
|
@ -1172,6 +1173,7 @@ void HistoryItem::setServiceText(PreparedServiceText &&prepared) {
|
||||||
if (!text.text.isEmpty() && !text.text.contains(timeString)) {
|
if (!text.text.isEmpty() && !text.text.contains(timeString)) {
|
||||||
text = text.append(timeString);
|
text = text.append(timeString);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
AddComponents(HistoryServiceData::Bit());
|
AddComponents(HistoryServiceData::Bit());
|
||||||
_flags &= ~MessageFlag::HasTextLinks;
|
_flags &= ~MessageFlag::HasTextLinks;
|
||||||
|
|
Loading…
Add table
Reference in a new issue