mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 23:54:32 +00:00
Working Text Clipboard
This commit is contained in:
parent
7396f0242a
commit
4890e6fc28
8 changed files with 631 additions and 4 deletions
|
|
@ -94,8 +94,8 @@ struct ContentView: View {
|
|||
isHovering = hovering
|
||||
}
|
||||
|
||||
// Only close if mouse leaves and the notch is open
|
||||
if !hovering && vm.notchState == .open {
|
||||
// Only close if mouse leaves and the notch is open and no popovers are active
|
||||
if !hovering && vm.notchState == .open && !vm.isBatteryPopoverActive && !vm.isClipboardPopoverActive {
|
||||
vm.close()
|
||||
}
|
||||
}
|
||||
|
|
@ -148,6 +148,13 @@ struct ContentView: View {
|
|||
}
|
||||
}
|
||||
}
|
||||
.onChange(of: vm.isClipboardPopoverActive) { _, newPopoverState in
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
|
||||
if !newPopoverState && !isHovering && vm.notchState == .open && !vm.isBatteryPopoverActive {
|
||||
vm.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
.sensoryFeedback(.alignment, trigger: haptics)
|
||||
.contextMenu {
|
||||
SettingsLink(label: {
|
||||
|
|
@ -477,8 +484,8 @@ struct ContentView: View {
|
|||
isHovering = false
|
||||
}
|
||||
|
||||
// Close the notch if it's open and battery popover is not active
|
||||
if vm.notchState == .open && !vm.isBatteryPopoverActive {
|
||||
// Close the notch if it's open and no popovers are active
|
||||
if vm.notchState == .open && !vm.isBatteryPopoverActive && !vm.isClipboardPopoverActive {
|
||||
vm.close()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue