mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 15:15:13 +00:00
Fix no-bubble comments button resize.
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user