mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 15:47:11 +02:00
Improve clearing of reaction animations.
This commit is contained in:
parent
490e688a91
commit
928d8feb21
2 changed files with 10 additions and 3 deletions
|
@ -239,10 +239,12 @@ void BottomInfo::paintReactions(
|
|||
auto x = left;
|
||||
auto y = top;
|
||||
auto widthLeft = availableWidth;
|
||||
const auto animated = (_reactionAnimation && context.reactionEffects)
|
||||
const auto animated = _reactionAnimation
|
||||
? _reactionAnimation->playingAroundEmoji()
|
||||
: QString();
|
||||
if (_reactionAnimation && animated.isEmpty()) {
|
||||
if (_reactionAnimation
|
||||
&& context.reactionEffects
|
||||
&& animated.isEmpty()) {
|
||||
_reactionAnimation = nullptr;
|
||||
}
|
||||
for (const auto &reaction : _reactions) {
|
||||
|
@ -361,6 +363,11 @@ void BottomInfo::layoutRepliesText() {
|
|||
}
|
||||
|
||||
void BottomInfo::layoutReactionsText() {
|
||||
if (_reactionAnimation
|
||||
&& !_data.reactions.contains(
|
||||
_reactionAnimation->playingAroundEmoji())) {
|
||||
_reactionAnimation = nullptr;
|
||||
}
|
||||
if (_data.reactions.empty()) {
|
||||
_reactions.clear();
|
||||
return;
|
||||
|
|
|
@ -193,7 +193,7 @@ void InlineList::paint(
|
|||
const auto animated = (_animation && context.reactionEffects)
|
||||
? _animation->playingAroundEmoji()
|
||||
: QString();
|
||||
if (_animation && animated.isEmpty()) {
|
||||
if (_animation && context.reactionEffects && animated.isEmpty()) {
|
||||
_animation = nullptr;
|
||||
}
|
||||
p.setFont(st::semiboldFont);
|
||||
|
|
Loading…
Add table
Reference in a new issue