File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed
Core/Sources/SuggestionWidget Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -403,9 +403,15 @@ extension SuggestionWidgetController {
403403 /// element.
404404 private func updateWindowLocation( animated: Bool = false ) {
405405 func hide( ) {
406- panelWindow. alphaValue = 0
407- widgetWindow. alphaValue = 0
408- tabWindow. alphaValue = 0
406+ if panelWindow. alphaValue != 0 {
407+ panelWindow. alphaValue = 0
408+ }
409+ if widgetWindow. alphaValue != 0 {
410+ widgetWindow. alphaValue = 0
411+ }
412+ if tabWindow. alphaValue != 0 {
413+ tabWindow. alphaValue = 0
414+ }
409415 }
410416
411417 guard UserDefaults . shared. value ( for: \. suggestionPresentationMode) == . floatingWidget
@@ -448,9 +454,15 @@ extension SuggestionWidgetController {
448454 suggestionPanelViewModel. alignTopToAnchor = result. alignPanelTopToAnchor
449455 }
450456
451- panelWindow. alphaValue = 1
452- widgetWindow. alphaValue = 1
453- tabWindow. alphaValue = 1
457+ if panelWindow. alphaValue != 1 {
458+ panelWindow. alphaValue = 1
459+ }
460+ if widgetWindow. alphaValue != 1 {
461+ widgetWindow. alphaValue = 1
462+ }
463+ if tabWindow. alphaValue != 1 {
464+ tabWindow. alphaValue = 1
465+ }
454466 return
455467 }
456468 }
You can’t perform that action at this time.
0 commit comments