From 6bcdd5120155175bb1b10708934011c946fc0d37 Mon Sep 17 00:00:00 2001 From: superdooper86 Date: Fri, 17 Jul 2026 10:37:32 +0200 Subject: [PATCH] fix: retain failed and empty meetings --- Meetingnotes.xcodeproj/project.pbxproj | 8 ++++---- .../ViewModels/MeetingViewModel.swift | 20 ------------------- meetingnotes/Views/MeetingListView.swift | 5 +++-- 3 files changed, 7 insertions(+), 26 deletions(-) diff --git a/Meetingnotes.xcodeproj/project.pbxproj b/Meetingnotes.xcodeproj/project.pbxproj index b75d222..acfec83 100644 --- a/Meetingnotes.xcodeproj/project.pbxproj +++ b/Meetingnotes.xcodeproj/project.pbxproj @@ -276,7 +276,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 19; + CURRENT_PROJECT_VERSION = 20; DEVELOPMENT_ASSET_PATHS = "\"meetingnotes/Preview Content\""; DEVELOPMENT_TEAM = G9LVHZAJNX; ENABLE_HARDENED_RUNTIME = YES; @@ -290,7 +290,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 15.0; - MARKETING_VERSION = 1.1.7; + MARKETING_VERSION = 1.1.8; ONLY_ACTIVE_ARCH = NO; OTHER_SWIFT_FLAGS = "$(inherited) -D ENABLE_TCC_SPI"; PRODUCT_BUNDLE_IDENTIFIER = net.jamesbone.meetingnotes; @@ -312,7 +312,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 19; + CURRENT_PROJECT_VERSION = 20; DEVELOPMENT_ASSET_PATHS = "\"meetingnotes/Preview Content\""; DEVELOPMENT_TEAM = G9LVHZAJNX; ENABLE_HARDENED_RUNTIME = YES; @@ -326,7 +326,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 15.0; - MARKETING_VERSION = 1.1.7; + MARKETING_VERSION = 1.1.8; ONLY_ACTIVE_ARCH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D ENABLE_TCC_SPI"; PRODUCT_BUNDLE_IDENTIFIER = net.jamesbone.meetingnotes; diff --git a/meetingnotes/ViewModels/MeetingViewModel.swift b/meetingnotes/ViewModels/MeetingViewModel.swift index ae23fb8..34fc659 100644 --- a/meetingnotes/ViewModels/MeetingViewModel.swift +++ b/meetingnotes/ViewModels/MeetingViewModel.swift @@ -54,15 +54,6 @@ class MeetingViewModel: ObservableObject { private let recordingSessionManager = RecordingSessionManager.shared private var cancellables = Set() - private var isNewMeeting = false - - // Computed property to check if meeting is empty - var isEmpty: Bool { - return meeting.transcriptChunks.isEmpty && - meeting.userNotes.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty && - meeting.generatedNotes.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty && - meeting.title.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty - } init(meeting: Meeting = Meeting()) { // Load the latest version of the meeting from storage if it exists @@ -76,9 +67,6 @@ class MeetingViewModel: ObservableObject { - // Detect if this is a new meeting based on content, not storage existence - isNewMeeting = isEmpty - // Set initial tab based on notes existence if !self.meeting.generatedNotes.isEmpty { selectedTab = .enhancedNotes @@ -333,12 +321,4 @@ class MeetingViewModel: ObservableObject { } } - func deleteIfEmpty() { - if isEmpty && !isRecording && !isProcessing { - print("🗑️ Auto-deleting empty meeting") - deleteMeeting() - } else { - saveMeeting() - } - } } diff --git a/meetingnotes/Views/MeetingListView.swift b/meetingnotes/Views/MeetingListView.swift index 4623a32..f9d7aee 100644 --- a/meetingnotes/Views/MeetingListView.swift +++ b/meetingnotes/Views/MeetingListView.swift @@ -445,8 +445,9 @@ struct MeetingDetailContentView: View { Text("Are you sure you want to delete this meeting? This action cannot be undone.") } .onDisappear { - // Auto-delete empty meetings when leaving, otherwise save - viewModel.deleteIfEmpty() + // A failed recording may still be empty. Keep it until the user + // explicitly deletes it so app updates cannot erase history. + viewModel.saveMeeting() } }