diff --git a/tray.go b/tray.go index 47cae54..5ff5d0f 100644 --- a/tray.go +++ b/tray.go @@ -175,19 +175,13 @@ func onReady() { sched := cron.New() var applyConfig func() - state.onBusyChanged = func(bool) { - idx := getActiveProfile() - if isProfileBusy(idx) { + state.onBusyChanged = func(busy bool) { + if busy { mCancel.Show() mBackup.Hide() mPrune.Disable() mCheck.Disable() mUnlock.Disable() - } else { - mCancel.Hide() - mPrune.Enable() - mCheck.Enable() - mUnlock.Enable() } }