Update version

This commit is contained in:
2026-01-16 11:28:26 +01:00
parent 7988257399
commit c6be398e5a
28 changed files with 1061 additions and 193 deletions
@@ -2,7 +2,7 @@ import SwiftUI
import StoreKit
struct SettingsView: View {
@EnvironmentObject var iapService: IAPService
private let iapService: IAPService
@StateObject private var viewModel: SettingsViewModel
@AppStorage("calmModeEnabled") private var calmModeEnabled = true
@AppStorage("cloudSyncEnabled") private var cloudSyncEnabled = false
@@ -19,8 +19,9 @@ struct SettingsView: View {
@State private var showingRestartAlert = false
@State private var didLoadCloudSync = false
init() {
_viewModel = StateObject(wrappedValue: SettingsViewModel(iapService: IAPService()))
init(iapService: IAPService) {
self.iapService = iapService
_viewModel = StateObject(wrappedValue: SettingsViewModel(iapService: iapService))
}
var body: some View {
@@ -221,7 +222,7 @@ struct SettingsView: View {
.font(.headline)
.foregroundColor(.primary)
Text("Unlock all features for €4.69")
Text("Unlock all features for \(iapService.formattedPrice)")
.font(.caption)
.foregroundColor(.secondary)
}
@@ -705,7 +706,6 @@ struct PinSetupView: View {
}
#Preview {
SettingsView()
.environmentObject(IAPService())
SettingsView(iapService: IAPService())
.environmentObject(AccountStore(iapService: IAPService()))
}