Fix crash in premium preview.

This commit is contained in:
John Preston
2025-08-31 23:34:20 +04:00
parent 51a58182ee
commit a37528b377
@@ -64,8 +64,10 @@ Bubble::Bubble(
const auto texts = _textFactory(0);
_numberAnimation.setText(texts.counter, 0);
_numberAnimation.finishAnimating();
if (!texts.additional.isEmpty()) {
_additional.setText(_st.additionalStyle, texts.additional);
}
}
crl::time Bubble::SlideNoDeflectionDuration() {
return kSlideDuration * kStepBeforeDeflection;
@@ -120,9 +122,11 @@ void Bubble::setCounter(int value) {
_counter = value;
const auto texts = _textFactory(value);
_numberAnimation.setText(texts.counter, value);
if (!texts.additional.isEmpty()) {
_additional.setText(_st.additionalStyle, texts.additional);
}
}
}
void Bubble::setTailEdge(EdgeProgress edge) {
_tailEdge = std::clamp(edge, 0., 1.);