messageTray: Remove some more dead code
It's impossible to have a clicked summary item if we have a main notification or the tray is hidden, and has been ever since 3.6.
This commit is contained in:
parent
158ca9746c
commit
2df0c02dfd
@ -2302,9 +2302,6 @@ const MessageTray = new Lang.Class({
|
|||||||
|
|
||||||
// Summary notification
|
// Summary notification
|
||||||
let haveClickedSummaryItem = this._clickedSummaryItem != null;
|
let haveClickedSummaryItem = this._clickedSummaryItem != null;
|
||||||
let summarySourceIsMainNotificationSource = (haveClickedSummaryItem && this._notification &&
|
|
||||||
this._clickedSummaryItem.source == this._notification.source);
|
|
||||||
let canShowSummaryBoxPointer = this._trayState == State.SHOWN;
|
|
||||||
// We only have sources with empty notification stacks for legacy tray icons. Currently, we never attempt
|
// We only have sources with empty notification stacks for legacy tray icons. Currently, we never attempt
|
||||||
// to show notifications for legacy tray icons, but this would be necessary if we did.
|
// to show notifications for legacy tray icons, but this would be necessary if we did.
|
||||||
let requestedNotificationStackIsEmpty = (haveClickedSummaryItem &&
|
let requestedNotificationStackIsEmpty = (haveClickedSummaryItem &&
|
||||||
@ -2321,10 +2318,10 @@ const MessageTray = new Lang.Class({
|
|||||||
(wrongSummaryNotificationStack || wrongSummaryRightClickMenu));
|
(wrongSummaryNotificationStack || wrongSummaryRightClickMenu));
|
||||||
|
|
||||||
if (this._summaryBoxPointerState == State.HIDDEN) {
|
if (this._summaryBoxPointerState == State.HIDDEN) {
|
||||||
if (haveClickedSummaryItem && !summarySourceIsMainNotificationSource && canShowSummaryBoxPointer && !requestedNotificationStackIsEmpty)
|
if (haveClickedSummaryItem && !requestedNotificationStackIsEmpty)
|
||||||
this._showSummaryBoxPointer();
|
this._showSummaryBoxPointer();
|
||||||
} else if (this._summaryBoxPointerState == State.SHOWN) {
|
} else if (this._summaryBoxPointerState == State.SHOWN) {
|
||||||
if (!haveClickedSummaryItem || !canShowSummaryBoxPointer || wrongSummaryBoxPointer || !hasNotifications) {
|
if (!haveClickedSummaryItem || wrongSummaryBoxPointer || !hasNotifications) {
|
||||||
this._hideSummaryBoxPointer();
|
this._hideSummaryBoxPointer();
|
||||||
if (wrongSummaryBoxPointer)
|
if (wrongSummaryBoxPointer)
|
||||||
this._showSummaryBoxPointer();
|
this._showSummaryBoxPointer();
|
||||||
|
Loading…
Reference in New Issue
Block a user