messageTray: Use the BoxPointer APIs for hiding without animating

This commit is contained in:
Jasper St. Pierre 2013-08-02 00:11:16 -04:00
parent c4bc9616af
commit 1ec349f7c9

View File

@ -2717,15 +2717,9 @@ const MessageTray = new Lang.Class({
this._sourceDoneDisplayingId = 0; this._sourceDoneDisplayingId = 0;
} }
if (this._summaryBoxPointerItem.source.notifications.length == 0) { let animate = (this._summaryBoxPointerItem.source.notifications.length > 0);
this._summaryBoxPointer.actor.hide(); this._summaryBoxPointer.hide(animate ? BoxPointer.PopupAnimation.FULL : BoxPointer.PopupAnimation.NONE,
this._hideSummaryBoxPointerCompleted(); Lang.bind(this, this._hideSummaryBoxPointerCompleted));
} else {
if (global.stage.key_focus &&
!this.actor.contains(global.stage.key_focus))
this._setClickedSummaryItem(null);
this._summaryBoxPointer.hide(BoxPointer.PopupAnimation.FULL, Lang.bind(this, this._hideSummaryBoxPointerCompleted));
}
}, },
_hideSummaryBoxPointer: function() { _hideSummaryBoxPointer: function() {