Update version
This commit is contained in:
@@ -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()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user