Skip to content

Commit

Permalink
Changing Touch Bar icon immediately after toggling mode
Browse files Browse the repository at this point in the history
  • Loading branch information
insidegui committed Nov 14, 2019
1 parent cad872a commit 3412e92
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions NoiseBuddy/Controllers/TouchBarUIController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ final class TouchBarUIController: NoiseControlUIController {
DFRElementSetControlStripPresenceForIdentifier(.noiseControl, shouldShow(for: currentDevice))
}

override func toggleNoiseControlMode(_ sender: Any) {
let nextMode = preferences.nextListeningMode(from: listeningModeController.listeningMode)

listeningModeController.listeningMode = nextMode

button.image = nextMode.touchBarImage
}

override func handleListeningModeDidChange(_ device: NCDevice) {
button.image = device.listeningMode.touchBarImage
}
Expand Down

0 comments on commit 3412e92

Please # to comment.