Skip to content

Commit

Permalink
dont build menu when not showing, update systray (#1897)
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Pickett authored Oct 18, 2024
1 parent 37629ee commit a03902d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ee/desktop/user/menu/menu_systray.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ func (m *menu) Build() {
buildMutex.Lock()
defer buildMutex.Unlock()

if !systray.IsReady() {
// if we never started the menu, don't do anything
return
}

// Remove all menu items each time we rebuild the menu
systray.ResetMenu()

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ require (
github.com/golang-migrate/migrate/v4 v4.16.2
github.com/golang/snappy v0.0.4
github.com/kolide/goleveldb v0.0.0-20240514204455-8d30cd4d31c6
github.com/kolide/systray v1.10.5-0.20241017184621-82afdf172150
github.com/kolide/systray v1.10.5-0.20241018174140-3d1b0664c945
github.com/kolide/toast v1.0.2
github.com/saltosystems/winrt-go v0.0.0-20240510082706-db61b37f5877
github.com/shirou/gopsutil/v3 v3.23.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ github.com/kolide/kit v0.0.0-20240411131714-94dd1939cf50 h1:N7RaYBPTK5o4y2z1z8kl
github.com/kolide/kit v0.0.0-20240411131714-94dd1939cf50/go.mod h1:pFbEKXFww1uqu4RRO7qCnUmQ2EIwKYRzUqpJbODNlfc=
github.com/kolide/krypto v0.1.1-0.20231229162826-db516b7e0121 h1:f7APX9VNsCkD/tdlAjbU4A22FyfTOCF6QadlvnzZElg=
github.com/kolide/krypto v0.1.1-0.20231229162826-db516b7e0121/go.mod h1:/0sxd3OIxciTlMTeZI/9WTaUHsx/K/+3f+NbD5dywTY=
github.com/kolide/systray v1.10.5-0.20241017184621-82afdf172150 h1:hJ0psuZjLQxsWrz1ec6bjkhrpiyIk67dTf9kjpcsP/o=
github.com/kolide/systray v1.10.5-0.20241017184621-82afdf172150/go.mod h1:rnPcECLGM9DY/+fb3O9WNKiPBPMCdNg3rkyadLWOCTU=
github.com/kolide/systray v1.10.5-0.20241018174140-3d1b0664c945 h1:NO+UQe89tISQj+rS0l+hrB4BAF3oKdLGhZLddC5weXM=
github.com/kolide/systray v1.10.5-0.20241018174140-3d1b0664c945/go.mod h1:rnPcECLGM9DY/+fb3O9WNKiPBPMCdNg3rkyadLWOCTU=
github.com/kolide/toast v1.0.2 h1:BQlIfO3wbKIEWfF0c8v4UkdhSIZYnSWaKkZl+Yarptk=
github.com/kolide/toast v1.0.2/go.mod h1:OguLiOUf57YSEuZqjfk4uP4KdT0QOblGoySOI8F1I0Y=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
Expand Down

0 comments on commit a03902d

Please sign in to comment.