Clipboard Floating Panel

This commit is contained in:
Hariharan Mudaliar 2025-08-12 23:38:10 +05:30
commit e583069870
12 changed files with 549 additions and 226 deletions

View file

@ -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()
}
}