Fix no-bubble comments button resize.

This commit is contained in:
John Preston 2022-09-08 09:38:52 +04:00
parent c00f2f96ec
commit b0203af398
1 changed files with 8 additions and 2 deletions

View File

@ -1741,8 +1741,14 @@ void HistoryMessage::refreshRepliesText(
views->repliesSmall.text = (views->replies.count > 0)
? Lang::FormatCountToShort(views->replies.count).string
: QString();
views->repliesSmall.textWidth = st::semiboldFont->width(
views->repliesSmall.text);
const auto hadText = (views->repliesSmall.textWidth > 0);
views->repliesSmall.textWidth = (views->replies.count > 0)
? st::semiboldFont->width(views->repliesSmall.text)
: 0;
const auto hasText = (views->repliesSmall.textWidth > 0);
if (hasText != hadText) {
forceResize = true;
}
}
if (forceResize) {
history()->owner().requestItemResize(this);