subrascasse

Sub Rascasse: an iPhone dive log for Subsurface cloud storage, with a pure-Swift git client (GPL-2.0)
git clone https://git.schurger.org/subrascasse.git
Log | Files | Refs | README | LICENSE

commit 3e39794f9456c917452c142dfcac0b93d7f8fe00
parent 44108c7e74907f935416e1041a4f3500a1bccd5a
Author: Jean Schurger <jean@schurger.org>
Date:   Sat, 14 Nov 2026 14:15:25 -0500

Dive list: taps open dives again

The list selection added for merging swallowed the taps on the rows. The
selection is now made of plain buttons with a check mark, and the list has no
selection binding.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K7deYG3yp7VDUZJzSBkvTc

Diffstat:
MApp/Views/DiveListView.swift | 20++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/App/Views/DiveListView.swift b/App/Views/DiveListView.swift @@ -19,14 +19,27 @@ struct DiveListView: View { var body: some View { NavigationStack(path: $path) { let sections = model.sections(matching: search) - List(selection: $selection) { + // A plain list: a list with a selection binding swallows the taps on its links, even outside edit mode. + List { SyncBanner() ForEach(sections) { section in Section { ForEach(section.dives) { dive in if selecting { - // Selection mode: no link, and only what tells the dives apart. - DiveRow(dive: dive, compact: true) + // Selection mode: no link, a check mark, and only what tells the dives apart. + Button { + if selection.contains(dive.id) { selection.remove(dive.id) } else { selection.insert(dive.id) } + } label: { + HStack(spacing: 12) { + Image(systemName: selection.contains(dive.id) ? "checkmark.circle.fill" : "circle") + .font(.title3) + .foregroundStyle(selection.contains(dive.id) ? Color.accentColor : Color.secondary) + DiveRow(dive: dive, compact: true) + } + .contentShape(Rectangle()) + } + .buttonStyle(.plain) + .listRowBackground(selection.contains(dive.id) ? Color.accentColor.opacity(0.12) : nil) } else { NavigationLink(value: dive.id) { DiveRow(dive: dive) } } @@ -55,7 +68,6 @@ struct DiveListView: View { ContentUnavailableView.search(text: search) } } - .environment(\.editMode, .constant(selecting ? .active : .inactive)) .navigationTitle(selecting ? (selection.count == 1 ? String(localized: "1 dive selected") : String(localized: "\(selection.count) dives selected")) : String(localized: "Dives"))