mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix no-bubble comments button resize.
This commit is contained in:
parent
c00f2f96ec
commit
b0203af398
1 changed files with 8 additions and 2 deletions
|
@ -1741,8 +1741,14 @@ void HistoryMessage::refreshRepliesText(
|
||||||
views->repliesSmall.text = (views->replies.count > 0)
|
views->repliesSmall.text = (views->replies.count > 0)
|
||||||
? Lang::FormatCountToShort(views->replies.count).string
|
? Lang::FormatCountToShort(views->replies.count).string
|
||||||
: QString();
|
: QString();
|
||||||
views->repliesSmall.textWidth = st::semiboldFont->width(
|
const auto hadText = (views->repliesSmall.textWidth > 0);
|
||||||
views->repliesSmall.text);
|
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) {
|
if (forceResize) {
|
||||||
history()->owner().requestItemResize(this);
|
history()->owner().requestItemResize(this);
|
||||||
|
|
Loading…
Add table
Reference in a new issue