Jotley / app · jotley.ai / iOS / Views / iOSNotesListView+Actions.swift
| 1 | import SwiftUI |
| 2 | |
| 3 | extension 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 | } |