diff --git a/MTMR/ShellScriptTouchBarItem.swift b/MTMR/ShellScriptTouchBarItem.swift index 01dca4b..1228a97 100644 --- a/MTMR/ShellScriptTouchBarItem.swift +++ b/MTMR/ShellScriptTouchBarItem.swift @@ -42,7 +42,9 @@ class ShellScriptTouchBarItem: CustomButtonTouchBarItem { // Update UI DispatchQueue.main.async { [weak self, newBackgoundColor] in - self?.backgroundColor = newBackgoundColor + if (newBackgoundColor != self?.backgroundColor) { // performance optimization because of reinstallButton + self?.backgroundColor = newBackgoundColor + } self?.attributedTitle = title self?.forceHideConstraint.isActive = scriptResult == "" }