Fix cloud model default clearing
This commit is contained in:
parent
6c7249ec48
commit
f7e160ac99
@ -448,7 +448,7 @@
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 132;
|
||||
CURRENT_PROJECT_VERSION = 134;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"VoiceInk/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = V6J6A3VWY2;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
@ -463,7 +463,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 14.0;
|
||||
MARKETING_VERSION = 1.32;
|
||||
MARKETING_VERSION = 1.34;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.prakashjoshipax.VoiceInk;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
@ -481,7 +481,7 @@
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 132;
|
||||
CURRENT_PROJECT_VERSION = 134;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"VoiceInk/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = V6J6A3VWY2;
|
||||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
@ -496,7 +496,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 14.0;
|
||||
MARKETING_VERSION = 1.32;
|
||||
MARKETING_VERSION = 1.34;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.prakashjoshipax.VoiceInk;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
|
||||
@ -234,6 +234,7 @@ struct CloudModelCardView: View {
|
||||
let isCurrent: Bool
|
||||
var setDefaultAction: () -> Void
|
||||
|
||||
@EnvironmentObject private var whisperState: WhisperState
|
||||
@StateObject private var aiService = AIService()
|
||||
@State private var isExpanded = false
|
||||
@State private var apiKey = ""
|
||||
@ -532,6 +533,16 @@ struct CloudModelCardView: View {
|
||||
verificationStatus = .none
|
||||
isConfiguredState = false
|
||||
|
||||
// If this model is currently the default, clear it
|
||||
if isCurrent {
|
||||
Task {
|
||||
await MainActor.run {
|
||||
whisperState.currentTranscriptionModel = nil
|
||||
UserDefaults.standard.removeObject(forKey: "CurrentTranscriptionModel")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
withAnimation(.easeInOut(duration: 0.3)) {
|
||||
isExpanded = false
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user