Float in-flight notes to top of list; make full row tappable

Claude-Session: https://claude.ai/code/session_014esDWi42URLEC6Cj17hGQ3
This commit is contained in:
2026-07-16 13:59:22 -04:00
parent 50adf522a8
commit 14979d4a69
+13 -1
View File
@@ -55,7 +55,7 @@ struct NotesListView: View {
}
Section("All notes") {
ForEach(notes) { note in
ForEach(orderedNotes) { note in
row(note)
}
}
@@ -71,11 +71,23 @@ struct NotesListView: View {
}
}
/// In-flight notes (transcription still pending) float to the top;
/// everything else stays newest-first.
private var orderedNotes: [NoteEntity] {
notes.filter(isInFlight) + notes.filter { !isInFlight($0) }
}
private func isInFlight(_ note: NoteEntity) -> Bool {
note.audio?.transcriptionStatus == .pending
}
private func row(_ note: NoteEntity) -> some View {
Button {
editingNote = note
} label: {
NoteRowView(note: note)
.frame(maxWidth: .infinity, alignment: .leading)
.contentShape(Rectangle())
}
.buttonStyle(.plain)
.swipeActions(edge: .trailing) {