mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Clipboard Floating Panel
This commit is contained in:
parent
e29745f8f4
commit
e583069870
12 changed files with 549 additions and 226 deletions
|
|
@ -124,7 +124,7 @@ 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.isClipboardPopoverActive {
|
||||
if !hovering && vm.notchState == .open && !vm.isBatteryPopoverActive {
|
||||
vm.close()
|
||||
}
|
||||
}
|
||||
|
|
@ -177,13 +177,6 @@ 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: {
|
||||
|
|
@ -524,7 +517,7 @@ struct ContentView: View {
|
|||
}
|
||||
|
||||
// Close the notch if it's open and no popovers are active
|
||||
if vm.notchState == .open && !vm.isBatteryPopoverActive && !vm.isClipboardPopoverActive {
|
||||
if vm.notchState == .open && !vm.isBatteryPopoverActive {
|
||||
vm.close()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue