Mercurial > public > simoleon
comparison Simoleon/Settings.swift @ 78:822175ac4343
Fix bug with Picker
author | Dennis Concepción Martín <dennisconcepcionmartin@gmail.com> |
---|---|
date | Sat, 31 Jul 2021 17:10:08 +0100 |
parents | b6f8661300f2 |
children | 529feb1fc8d5 |
comparison
equal
deleted
inserted
replaced
77:1069c33d3a42 | 78:822175ac4343 |
---|---|
44 SearchBar(placeholder: "Search...", text: $searchCurrency) | 44 SearchBar(placeholder: "Search...", text: $searchCurrency) |
45 .padding(5) | 45 .padding(5) |
46 | 46 |
47 ForEach(searchResults, id: \.self) { currencyPair in | 47 ForEach(searchResults, id: \.self) { currencyPair in |
48 Text(currencyPair.name) | 48 Text(currencyPair.name) |
49 .tag(currencyPair.name) | |
49 } | 50 } |
50 } | 51 } |
51 } else { | 52 } else { |
52 LockedCurrencyPicker() | 53 LockedCurrencyPicker() |
53 .contentShape(Rectangle()) | 54 .contentShape(Rectangle()) |
150 // Check if user subscription is active | 151 // Check if user subscription is active |
151 private func checkEntitlement() { | 152 private func checkEntitlement() { |
152 Purchases.shared.purchaserInfo { (purchaserInfo, error) in | 153 Purchases.shared.purchaserInfo { (purchaserInfo, error) in |
153 if purchaserInfo?.entitlements["all"]?.isActive == true { | 154 if purchaserInfo?.entitlements["all"]?.isActive == true { |
154 entitlementIsActive = true | 155 entitlementIsActive = true |
155 } else { | |
156 entitlementIsActive = false | |
157 } | 156 } |
158 | 157 |
159 if let error = error as NSError? { | 158 if let error = error as NSError? { |
160 alertTitle = error.localizedDescription | 159 alertTitle = error.localizedDescription |
161 alertMessage = error.localizedFailureReason ?? "" | 160 alertMessage = error.localizedFailureReason ?? "" |