mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
fix: hint stacking for TTL messages
This commit is contained in:
parent
69e9841bbb
commit
19a5dc8a0c
1 changed files with 8 additions and 5 deletions
|
@ -2794,11 +2794,14 @@ void HistoryItem::setAyuHint(const QString &hint) {
|
||||||
&& this->author()->isMegagroup();
|
&& this->author()->isMegagroup();
|
||||||
} else {
|
} else {
|
||||||
const auto data = Get<HistoryServiceData>();
|
const auto data = Get<HistoryServiceData>();
|
||||||
auto prepared = PreparedServiceText{
|
const auto postfix = QString(" (%1)").arg(hint);
|
||||||
.text = _text.append(QString(" (%1)").arg(hint)),
|
if (!_text.text.endsWith(postfix)) { // fix stacking for TTL messages
|
||||||
.links = data->textLinks
|
auto prepared = PreparedServiceText{
|
||||||
};
|
.text = _text.append(postfix),
|
||||||
setServiceText(std::move(prepared));
|
.links = data->textLinks
|
||||||
|
};
|
||||||
|
setServiceText(std::move(prepared));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
history()->owner().requestItemViewRefresh(this);
|
history()->owner().requestItemViewRefresh(this);
|
||||||
|
|
Loading…
Add table
Reference in a new issue