Skip to content
Open
Changes from all commits
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
24 changes: 15 additions & 9 deletions client/ui/client_ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@

client.setupSignalHandler(client.ctx)

client.setDefaultFonts()

Check failure on line 126 in client/ui/client_ui.go

View workflow job for this annotation

GitHub Actions / JS / Lint

client.setDefaultFonts undefined (type *serviceClient has no field or method setDefaultFonts) (typecheck)
systray.Run(client.onTrayReady, client.onTrayExit)
}

Expand Down Expand Up @@ -306,6 +306,8 @@
daemonVersion string
updateIndicationLock sync.Mutex
isUpdateIconActive bool
settingsEnabled bool
profilesEnabled bool
showNetworks bool
wNetworks fyne.Window
wProfiles fyne.Window
Expand Down Expand Up @@ -893,7 +895,7 @@
var systrayIconState bool

switch {
case status.Status == string(internal.StatusConnected):
case status.Status == string(internal.StatusConnected) && !s.mUp.Disabled():
s.connected = true
s.sendNotification = true
if s.isUpdateIconActive {
Expand All @@ -907,6 +909,7 @@
s.mUp.Disable()
s.mDown.Enable()
s.mNetworks.Enable()
s.mExitNode.Enable()
go s.updateExitNodes()
systrayIconState = true
case status.Status == string(internal.StatusConnecting):
Expand Down Expand Up @@ -1238,19 +1241,22 @@
return
}

s.updateIndicationLock.Lock()
defer s.updateIndicationLock.Unlock()

// Update settings menu based on current features
if features != nil && features.DisableUpdateSettings {
s.setSettingsEnabled(false)
} else {
s.setSettingsEnabled(true)
settingsEnabled := features == nil || !features.DisableUpdateSettings
if s.settingsEnabled != settingsEnabled {
s.settingsEnabled = settingsEnabled
s.setSettingsEnabled(settingsEnabled)
}

// Update profile menu based on current features
if s.mProfile != nil {
if features != nil && features.DisableProfiles {
s.mProfile.setEnabled(false)
} else {
s.mProfile.setEnabled(true)
profilesEnabled := features == nil || !features.DisableProfiles
if s.profilesEnabled != profilesEnabled {
s.profilesEnabled = profilesEnabled
s.mProfile.setEnabled(profilesEnabled)
}
}
}
Expand Down
Loading