mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 16:24:03 +09:00
Keep single notification hold
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user