Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Add powerMonitor events #364

Merged
merged 4 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove power target
  • Loading branch information
maddie committed May 9, 2022
commit 004281cb19d42b49c603a3ee639356bdb1183f17
5 changes: 0 additions & 5 deletions astilectron.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,6 @@ func (a *Astilectron) On(eventName string, l Listener) {
a.dispatcher.addListener(targetIDApp, eventName, l)
}

// OnPowerEvent implements the Listenable interface for power related events
func (a *Astilectron) OnPowerEvent(eventName string, l Listener) {
a.dispatcher.addListener(targetIDPower, eventName, l)
}

// Start starts Astilectron
func (a *Astilectron) Start() (err error) {
// Log
Expand Down
5 changes: 2 additions & 3 deletions event.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import (

// Target IDs
const (
targetIDApp = "app"
targetIDDock = "dock"
targetIDPower = "power"
targetIDApp = "app"
targetIDDock = "dock"
)

// Event represents an event
Expand Down