Fixed crash on destroying message view with reply ripple animation.
This commit is contained in:
parent
5285f74b13
commit
3c246fa49d
|
@ -1791,6 +1791,7 @@ void Message::toggleReplyRipple(bool pressed) {
|
||||||
|
|
||||||
const auto &padding = st::msgReplyPadding;
|
const auto &padding = st::msgReplyPadding;
|
||||||
const auto geometry = countGeometry();
|
const auto geometry = countGeometry();
|
||||||
|
const auto item = data();
|
||||||
const auto size = QSize(
|
const auto size = QSize(
|
||||||
geometry.width()
|
geometry.width()
|
||||||
- padding.left() / 2
|
- padding.left() / 2
|
||||||
|
@ -1803,7 +1804,7 @@ void Message::toggleReplyRipple(bool pressed) {
|
||||||
Images::Round(
|
Images::Round(
|
||||||
Ui::RippleAnimation::MaskByDrawer(size, true, nullptr),
|
Ui::RippleAnimation::MaskByDrawer(size, true, nullptr),
|
||||||
corners),
|
corners),
|
||||||
[=] { repaint(); });
|
[=] { item->history()->owner().requestItemRepaint(item); });
|
||||||
}
|
}
|
||||||
if (reply->ripple.animation) {
|
if (reply->ripple.animation) {
|
||||||
reply->ripple.animation->add(reply->ripple.lastPoint);
|
reply->ripple.animation->add(reply->ripple.lastPoint);
|
||||||
|
@ -3814,6 +3815,7 @@ int Message::resizeContentGetHeight(int newWidth) {
|
||||||
|
|
||||||
if (reply) {
|
if (reply) {
|
||||||
reply->resize(contentWidth - st::msgPadding.left() - st::msgPadding.right());
|
reply->resize(contentWidth - st::msgPadding.left() - st::msgPadding.right());
|
||||||
|
reply->ripple.animation = nullptr;
|
||||||
newHeight += st::msgReplyPadding.top() + st::msgReplyBarSize.height() + st::msgReplyPadding.bottom();
|
newHeight += st::msgReplyPadding.top() + st::msgReplyBarSize.height() + st::msgReplyPadding.bottom();
|
||||||
}
|
}
|
||||||
if (needInfoDisplay()) {
|
if (needInfoDisplay()) {
|
||||||
|
|
Loading…
Reference in New Issue