diff --git a/src/intellihide.js b/src/intellihide.js index 333977c..02cdec0 100644 --- a/src/intellihide.js +++ b/src/intellihide.js @@ -60,7 +60,6 @@ export const Intellihide = class { this._panelManager = dtpPanel.panelManager this._proximityManager = this._panelManager.proximityManager this._holdStatus = Hold.NONE - this._holdNotifyCount = 0 this._signalsHandler = new Utils.GlobalSignalsHandler() this._timeoutsHandler = new Utils.TimeoutsHandler() @@ -174,26 +173,13 @@ export const Intellihide = class { this._holdStatus |= holdStatus - if (holdStatus == Hold.NOTIFY) this._holdNotifyCount++ - this._maybePersistHoldStatus() } release(holdStatus) { if (!this.enabled) return - if ( - this._holdStatus & holdStatus && - (holdStatus != Hold.NOTIFY || !--this._holdNotifyCount) - ) - this._holdStatus -= holdStatus - - if (holdStatus == Hold.PERMANENT && this._holdStatus & Hold.NOTIFY) { - // the user pressed the keyboard shortcut to hide the panel while a - // notification hold is present, clear it to hide the panel - this._holdStatus -= Hold.NOTIFY - this._holdNotifyCount = 0 - } + if (this._holdStatus & holdStatus) this._holdStatus -= holdStatus if (!this._holdStatus) { this._maybePersistHoldStatus()