mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 15:44:32 +00:00
Fix: Closing when mouse hover out
This commit is contained in:
parent
e6eaf933ab
commit
4826cb5d44
3 changed files with 34 additions and 3 deletions
|
|
@ -86,6 +86,16 @@ struct DynamicIslandHeader: View {
|
|||
.popover(isPresented: $showClipboardPopover, arrowEdge: .bottom) {
|
||||
ClipboardPopover()
|
||||
}
|
||||
.onChange(of: showClipboardPopover) { isActive in
|
||||
vm.isClipboardPopoverActive = isActive
|
||||
|
||||
// If popover was closed, trigger a hover recheck
|
||||
if !isActive {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||
vm.shouldRecheckHover.toggle()
|
||||
}
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
if Defaults[.enableClipboardManager] && !clipboardManager.isMonitoring {
|
||||
clipboardManager.startMonitoring()
|
||||
|
|
@ -117,6 +127,16 @@ struct DynamicIslandHeader: View {
|
|||
.popover(isPresented: $showColorPickerPopover, arrowEdge: .bottom) {
|
||||
ColorPickerPopover()
|
||||
}
|
||||
.onChange(of: showColorPickerPopover) { isActive in
|
||||
vm.isColorPickerPopoverActive = isActive
|
||||
|
||||
// If popover was closed, trigger a hover recheck
|
||||
if !isActive {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||
vm.shouldRecheckHover.toggle()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if Defaults[.settingsIconInNotch] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue