mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +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();
|
||||
} else {
|
||||
const auto data = Get<HistoryServiceData>();
|
||||
auto prepared = PreparedServiceText{
|
||||
.text = _text.append(QString(" (%1)").arg(hint)),
|
||||
.links = data->textLinks
|
||||
};
|
||||
setServiceText(std::move(prepared));
|
||||
const auto postfix = QString(" (%1)").arg(hint);
|
||||
if (!_text.text.endsWith(postfix)) { // fix stacking for TTL messages
|
||||
auto prepared = PreparedServiceText{
|
||||
.text = _text.append(postfix),
|
||||
.links = data->textLinks
|
||||
};
|
||||
setServiceText(std::move(prepared));
|
||||
}
|
||||
}
|
||||
|
||||
history()->owner().requestItemViewRefresh(this);
|
||||
|
|
Loading…
Add table
Reference in a new issue