listless

A simple list app for Apple platforms
Log | Files | Refs | README | LICENSE

commit c0ba27a6c84495a6e940226aa7e391c0b4d1418b
parent 5802333d96c38ea85344dc6c68d76b1824f6b8de
Author: Michael Camilleri <[email protected]>
Date:   Mon, 23 Mar 2026 14:04:11 +0900

Tweak haptic feedback

This commit changes the haptic feedback that is provided when a user
created a new draft. This creates haptic feedback whenever that occurs.

Co-Authored-By: Claude 4.6 Opus <[email protected]>

Diffstat:
MListlessiOS/Extensions/TaskListView+PullGestures.swift | 2+-
MListlessiOS/Views/TaskListView.swift | 9++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ListlessiOS/Extensions/TaskListView+PullGestures.swift b/ListlessiOS/Extensions/TaskListView+PullGestures.swift @@ -107,7 +107,7 @@ private struct PullGesturesModifier: ViewModifier { } } .sensoryFeedback( - .impact(weight: .medium), + .impact(weight: .light), trigger: !isDraftOpen && pullToCreate.pullOffset >= pullCreateThreshold ) { old, new in !old && new diff --git a/ListlessiOS/Views/TaskListView.swift b/ListlessiOS/Views/TaskListView.swift @@ -9,6 +9,7 @@ struct TaskListView: View, TaskListViewProtocol { struct InteractionStateData { var dragState: DragState = .idle + var draftCount: Int = 0 var isShowingSyncDiagnostics = false var isShowingSettings = false var clearingTaskIDs: Set<UUID> = [] @@ -62,7 +63,12 @@ struct TaskListView: View, TaskListViewProtocol { var draftPlacement: DraftTaskPlacement? { get { iState.draftPlacement } - nonmutating set { iState.draftPlacement = newValue } + nonmutating set { + if newValue != nil, iState.draftPlacement == nil { + iState.draftCount += 1 + } + iState.draftPlacement = newValue + } } var draftTitle: String { @@ -577,6 +583,7 @@ struct TaskListView: View, TaskListViewProtocol { } } ) + .sensoryFeedback(.impact(weight: .medium), trigger: iState.draftCount) navigationHeader .padding(.top, 12)