No forgetting, deleting or clearing on a single press, anywhere

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-25 00:41:39 -04:00
parent 88371d19f0
commit f9e5d3f470
8 changed files with 267 additions and 84 deletions
@@ -66,10 +66,16 @@ Column {
width: parent.width
label: entry.modelData.name || entry.modelData.address || "Unknown device"
detail: root.stateLabel(entry.modelData)
// Armed, the detail names what Forget costs. "Forget" reads like
// "hide from this list"; it is the pairing itself that goes, and
// the device has to be put back into pairing mode to return.
detail: forgetConfirm.armed
? "Drops the pairing — the device must be put back into pairing mode to return"
: root.stateLabel(entry.modelData)
divider: entry.index < root.shown.length - 1
|| root.hiddenCount > 0 || root.showAll
controlWidth: 200
// Room for Keep and the confirming press while the row is armed.
controlWidth: forgetConfirm.armed ? 290 : 200
activatable: !entry.modelData.pairing
onActivated: root.primaryAction(entry.modelData)
@@ -87,11 +93,17 @@ Column {
onClicked: root.primaryAction(entry.modelData)
}
SettingsButton {
ConfirmAction {
id: forgetConfirm
anchors.verticalCenter: parent.verticalCenter
visible: entry.modelData.paired
text: "Forget"
onClicked: entry.modelData.forget()
actionId: "bluetooth-forget:"
+ (entry.modelData.address || entry.modelData.name || "")
armText: "Forget…"
confirmText: "Forget it"
enabled: !entry.modelData.pairing
onConfirmed: entry.modelData.forget()
}
}
}