Skip to content

Commit e18cd61

Browse files
Fix issues
1 parent b03510c commit e18cd61

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Recap/UseCases/Settings/Components/TabViews/GeneralSettingsView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ struct GeneralSettingsView<ViewModel: GeneralSettingsViewModelType>: View {
9090
VStack(alignment: .leading, spacing: 12) {
9191
CustomTextEditor(
9292
title: "Prompt Template",
93-
text: $viewModel.customPromptTemplate,
93+
text: viewModel.customPromptTemplate,
9494
placeholder: "Enter your custom prompt template here...",
9595
height: 120
9696
)

Recap/UseCases/Settings/SettingsView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ struct SettingsView<GeneralViewModel: GeneralSettingsViewModelType>: View {
153153

154154
// Just used for previews only!
155155
private final class PreviewGeneralSettingsViewModel: GeneralSettingsViewModelType {
156+
var customPromptTemplate: Binding<String> = .constant("Hello")
157+
156158
var showAPIKeyAlert: Bool = false
157159

158160
var existingAPIKey: String? = nil

Recap/UseCases/Settings/ViewModels/General/GeneralSettingsViewModelType.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ protocol GeneralSettingsViewModelType: ObservableObject {
1616
var showToast: Bool { get }
1717
var toastMessage: String { get }
1818
var activeWarnings: [WarningItem] { get }
19+
var customPromptTemplate: Binding<String> { get }
1920
var showAPIKeyAlert: Bool { get }
2021
var existingAPIKey: String? { get }
2122

0 commit comments

Comments
 (0)