messageTray: Set the state to SHOWN when the notification is updated

If the notification is updated while SHOWING, we'll overwrite the
tween updating it to the new 'y' position, but forget to update the
state to SHOWN at the end of our transition. Make sure to always set
the state to SHOWN at the end.

https://bugzilla.gnome.org/show_bug.cgi?id=704844
This commit is contained in:
Jasper St. Pierre 2014-03-12 17:59:40 -04:00
parent 29485ff24b
commit c675c93733

View File

@ -2790,7 +2790,12 @@ const MessageTray = new Lang.Class({
{ y: expandedY,
opacity: 255,
time: ANIMATION_TIME,
transition: 'easeOutQuad'
transition: 'easeOutQuad',
// HACK: Drive the state machine here better,
// instead of overwriting tweens
onComplete: Lang.bind(this, function() {
this._notificationState = State.SHOWN;
}),
});
}
},