mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 06:37:24 +02:00
Removed animation when removing reaction with double click.
This commit is contained in:
parent
acb6e5dbc3
commit
148a173474
2 changed files with 12 additions and 6 deletions
|
@ -1874,10 +1874,13 @@ void HistoryInner::toggleFavoriteReaction(not_null<Element*> view) const {
|
|||
if (allowed && !allowed->contains(favorite)) {
|
||||
return;
|
||||
}
|
||||
view->data()->toggleReaction(favorite);
|
||||
if (const auto top = itemTop(view); top >= 0) {
|
||||
view->animateReaction({ .emoji = favorite });
|
||||
const auto item = view->data();
|
||||
if (item->chosenReaction() != favorite) {
|
||||
if (const auto top = itemTop(view); top >= 0) {
|
||||
view->animateReaction({ .emoji = favorite });
|
||||
}
|
||||
}
|
||||
item->toggleReaction(favorite);
|
||||
}
|
||||
|
||||
void HistoryInner::contextMenuEvent(QContextMenuEvent *e) {
|
||||
|
|
|
@ -2108,10 +2108,13 @@ void ListWidget::toggleFavoriteReaction(not_null<Element*> view) const {
|
|||
if (allowed && !allowed->contains(favorite)) {
|
||||
return;
|
||||
}
|
||||
view->data()->toggleReaction(favorite);
|
||||
if (const auto top = itemTop(view); top >= 0) {
|
||||
view->animateReaction({ .emoji = favorite });
|
||||
const auto item = view->data();
|
||||
if (item->chosenReaction() != favorite) {
|
||||
if (const auto top = itemTop(view); top >= 0) {
|
||||
view->animateReaction({ .emoji = favorite });
|
||||
}
|
||||
}
|
||||
item->toggleReaction(favorite);
|
||||
}
|
||||
|
||||
void ListWidget::trySwitchToWordSelection() {
|
||||
|
|
Loading…
Add table
Reference in a new issue