messageTray: Be able to "switch" notifications
If you click on a summary item while another is up, we should swap without an extra click.
This commit is contained in:
parent
7a6b2abfeb
commit
1fd17b5027
@ -1633,10 +1633,8 @@ const MessageTray = new Lang.Class({
|
|||||||
_onSummaryItemClicked: function(summaryItem, button) {
|
_onSummaryItemClicked: function(summaryItem, button) {
|
||||||
if (summaryItem.source.handleSummaryClick()) {
|
if (summaryItem.source.handleSummaryClick()) {
|
||||||
this._setClickedSummaryItem(null);
|
this._setClickedSummaryItem(null);
|
||||||
} else if (!this._clickedSummaryItem) {
|
|
||||||
this._setClickedSummaryItem(summaryItem, button);
|
|
||||||
} else {
|
} else {
|
||||||
this._setClickedSummaryItem(null);
|
this._setClickedSummaryItem(summaryItem, button);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._updateState();
|
this._updateState();
|
||||||
@ -2277,9 +2275,11 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
_onSummaryBoxPointerUngrabbed: function() {
|
_onSummaryBoxPointerUngrabbed: function() {
|
||||||
this._summaryBoxPointerState = State.HIDING;
|
this._summaryBoxPointerState = State.HIDING;
|
||||||
this._setClickedSummaryItem(null);
|
|
||||||
this._unlock();
|
this._unlock();
|
||||||
|
|
||||||
|
if (this._summaryBoxPointerItem == this._clickedSummaryItem)
|
||||||
|
this._setClickedSummaryItem(null);
|
||||||
|
|
||||||
if (this._summaryBoxPointerItem.source.notifications.length == 0) {
|
if (this._summaryBoxPointerItem.source.notifications.length == 0) {
|
||||||
this._summaryBoxPointer.actor.hide();
|
this._summaryBoxPointer.actor.hide();
|
||||||
this._hideSummaryBoxPointerCompleted();
|
this._hideSummaryBoxPointerCompleted();
|
||||||
|
Loading…
Reference in New Issue
Block a user