Branchwell

Jotley / app · jotley.ai / iOS / Views / iOSNotesListView+Actions.swift

Raw 558 B on 0004e76b60187af1b51e974d64db6d5531ee0ab1
1import SwiftUI
2
3extension NotesListView {
4 func handleCreateNewNoteTapped() {
5 guard transcriptionManager.canStart else {
6 if transcriptionManager.isTranscribing { showingTranscriptionModal = true }
7 return
8 }
9 do {
10 newTranscriptionNote = try transcriptionManager.createNote()
11 // The transcription screen starts microphone capture as soon as it opens.
12 showingTranscriptionModal = true
13 } catch { transcriptionManager.errorMessage = error.localizedDescription }
14 }
15}