mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 07:34:32 +00:00
Updates WOrking
This commit is contained in:
parent
96e7f46460
commit
ab13b91d20
3 changed files with 72 additions and 18 deletions
|
|
@ -125,7 +125,15 @@ struct ContentView: View {
|
|||
|
||||
// Only close if mouse leaves and the notch is open and no popovers are active
|
||||
if !hovering && vm.notchState == .open && !vm.isBatteryPopoverActive {
|
||||
vm.close()
|
||||
// Add slight delay for stats tab to prevent accidental closure during layout changes
|
||||
let delay: Double = (coordinator.currentView == .stats) ? 0.2 : 0.0
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
|
||||
// Double-check conditions after delay
|
||||
if !isHovering && vm.notchState == .open && !vm.isBatteryPopoverActive {
|
||||
vm.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.onTapGesture {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue