No forgetting, deleting or clearing on a single press, anywhere
Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
@@ -246,15 +246,33 @@ SettingsPage {
|
||||
SliderRow { setting: "maxVisibleToasts" }
|
||||
SliderRow { setting: "notificationHistoryLimit" }
|
||||
|
||||
ActionRow {
|
||||
// A SettingRow with its own ConfirmAction rather than an ActionRow:
|
||||
// clearing history is not undoable and it takes the inline replies and
|
||||
// actions with it, so it takes two presses and the armed detail names
|
||||
// both the count and what stops being answerable.
|
||||
SettingRow {
|
||||
label: "Notification history"
|
||||
detail: Notifs.history.length === 1
|
||||
? "1 kept now · the oldest are dropped past the limit"
|
||||
: `${Notifs.history.length} kept now · the oldest are dropped past the limit`
|
||||
action: "Clear"
|
||||
enabled: Notifs.history.length > 0
|
||||
detail: clearConfirm.armed
|
||||
? (Notifs.history.length === 1
|
||||
? "Drops the 1 kept notification — its inline reply and actions go with it"
|
||||
: `Drops all ${Notifs.history.length} kept notifications — their inline replies and actions go with them`)
|
||||
: (Notifs.history.length === 1
|
||||
? "1 kept now · the oldest are dropped past the limit"
|
||||
: `${Notifs.history.length} kept now · the oldest are dropped past the limit`)
|
||||
controlWidth: clearConfirm.armed ? 200 : 110
|
||||
divider: false
|
||||
onTriggered: Notifs.dismissAll()
|
||||
|
||||
ConfirmAction {
|
||||
id: clearConfirm
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
actionId: "notification-history-clear"
|
||||
armText: "Clear…"
|
||||
confirmText: "Clear them"
|
||||
enabled: Notifs.history.length > 0
|
||||
onConfirmed: Notifs.dismissAll()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user