iconGrid: Only add one onComplete callback for the animations

We only need a callback on the last animated actor, so no need to
register the callback for all actors.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/678
This commit is contained in:
Jonas Dreßler 2019-08-09 00:18:38 +02:00 committed by Florian Müllner
parent b499ca47a3
commit 6f4c5022eb

View File

@ -545,12 +545,12 @@ var IconGrid = GObject.registerClass({
scale_y: 1,
duration: ANIMATION_TIME_IN,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
delay,
onComplete: () => {
if (isLastItem)
this._animationDone();
}
delay
};
if (isLastItem)
movementParams.onComplete = this._animationDone.bind(this);
fadeParams = {
opacity: 255,
duration: ANIMATION_FADE_IN_TIME_FOR_ITEM,
@ -571,13 +571,12 @@ var IconGrid = GObject.registerClass({
scale_y: scaleY,
duration: ANIMATION_TIME_OUT,
mode: Clutter.AnimationMode.EASE_IN_OUT_QUAD,
delay,
onComplete: () => {
if (isLastItem) {
this._animationDone();
}
}
delay
};
if (isLastItem)
movementParams.onComplete = this._animationDone.bind(this);
fadeParams = {
opacity: 0,
duration: ANIMATION_FADE_IN_TIME_FOR_ITEM,