Show something inside an 'empty' message.

This commit is contained in:
John Preston 2018-03-20 18:51:51 +04:00
parent 38c20fc3c2
commit 27ce1f8d44

View File

@ -970,6 +970,14 @@ void HistoryMessage::setText(const TextWithEntities &textWithEntities) {
st::messageTextStyle,
textWithEntities,
Ui::ItemTextOptions(this));
if (!textWithEntities.text.isEmpty() && _text.isEmpty()) {
// If server has allowed some text that we've trim-ed entirely,
// just replace it with something so that UI won't look buggy.
_text.setMarkedText(
st::messageTextStyle,
{ QString::fromUtf8("\xF0\x9F\x98\x94"), EntitiesInText() },
Ui::ItemTextOptions(this));
}
_textWidth = -1;
_textHeight = 0;
}