mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-10 00:58:37 +00:00
ShellScriptTouchBarItem: performance optimization
This commit is contained in:
parent
77f56df144
commit
36d1028af1
@ -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 == ""
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user