mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-11 09:28:38 +00:00
ShellScriptTouchBarItem: performance optimization
This commit is contained in:
parent
77f56df144
commit
36d1028af1
@ -42,7 +42,9 @@ class ShellScriptTouchBarItem: CustomButtonTouchBarItem {
|
|||||||
|
|
||||||
// Update UI
|
// Update UI
|
||||||
DispatchQueue.main.async { [weak self, newBackgoundColor] in
|
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?.attributedTitle = title
|
||||||
self?.forceHideConstraint.isActive = scriptResult == ""
|
self?.forceHideConstraint.isActive = scriptResult == ""
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user