Fix ripples in channel comments buttons.

This commit is contained in:
John Preston 2024-04-16 12:49:23 +04:00
parent 49c9e08b6c
commit fe73bf9053

View file

@ -1843,8 +1843,11 @@ void Message::clickHandlerPressedChanged(
Element::clickHandlerPressedChanged(handler, pressed);
if (!handler) {
return;
} else if (_rightAction) {
if (_rightAction->second && (handler == _rightAction->second->link)) {
} else if (_rightAction && (handler == _rightAction->link)) {
toggleRightActionRipple(pressed);
} else if (_rightAction
&& _rightAction->second
&& (handler == _rightAction->second->link)) {
const auto rightSize = rightActionSize();
Assert(rightSize != std::nullopt);
if (pressed) {
@ -1862,9 +1865,6 @@ void Message::clickHandlerPressedChanged(
} else if (_rightAction->second->ripple) {
_rightAction->second->ripple->lastStop();
}
} else if (handler == _rightAction->link) {
toggleRightActionRipple(pressed);
}
} else if (_comments && (handler == _comments->link)) {
toggleCommentsButtonRipple(pressed);
} else if (_topicButton && (handler == _topicButton->link)) {