mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 23:24:01 +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,11 +1874,14 @@ void HistoryInner::toggleFavoriteReaction(not_null<Element*> view) const {
|
||||||
if (allowed && !allowed->contains(favorite)) {
|
if (allowed && !allowed->contains(favorite)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
view->data()->toggleReaction(favorite);
|
const auto item = view->data();
|
||||||
|
if (item->chosenReaction() != favorite) {
|
||||||
if (const auto top = itemTop(view); top >= 0) {
|
if (const auto top = itemTop(view); top >= 0) {
|
||||||
view->animateReaction({ .emoji = favorite });
|
view->animateReaction({ .emoji = favorite });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
item->toggleReaction(favorite);
|
||||||
|
}
|
||||||
|
|
||||||
void HistoryInner::contextMenuEvent(QContextMenuEvent *e) {
|
void HistoryInner::contextMenuEvent(QContextMenuEvent *e) {
|
||||||
showContextMenu(e);
|
showContextMenu(e);
|
||||||
|
|
|
@ -2108,11 +2108,14 @@ void ListWidget::toggleFavoriteReaction(not_null<Element*> view) const {
|
||||||
if (allowed && !allowed->contains(favorite)) {
|
if (allowed && !allowed->contains(favorite)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
view->data()->toggleReaction(favorite);
|
const auto item = view->data();
|
||||||
|
if (item->chosenReaction() != favorite) {
|
||||||
if (const auto top = itemTop(view); top >= 0) {
|
if (const auto top = itemTop(view); top >= 0) {
|
||||||
view->animateReaction({ .emoji = favorite });
|
view->animateReaction({ .emoji = favorite });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
item->toggleReaction(favorite);
|
||||||
|
}
|
||||||
|
|
||||||
void ListWidget::trySwitchToWordSelection() {
|
void ListWidget::trySwitchToWordSelection() {
|
||||||
auto selectingSome = (_mouseAction == MouseAction::Selecting)
|
auto selectingSome = (_mouseAction == MouseAction::Selecting)
|
||||||
|
|
Loading…
Add table
Reference in a new issue