From cc1e549a4e3c95840872f07c8f56cc522707b8af Mon Sep 17 00:00:00 2001 From: timea-v Date: Thu, 23 May 2024 15:26:18 +0300 Subject: [PATCH 1/2] Replaced currency exchange property name as of KMP framework latest version. --- .../Scenes/Home/ViewModel/CurrencyExchangeViewModel.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iOSKMP/iOSKMP/Scenes/Home/ViewModel/CurrencyExchangeViewModel.swift b/iOSKMP/iOSKMP/Scenes/Home/ViewModel/CurrencyExchangeViewModel.swift index db10e6c..089cded 100644 --- a/iOSKMP/iOSKMP/Scenes/Home/ViewModel/CurrencyExchangeViewModel.swift +++ b/iOSKMP/iOSKMP/Scenes/Home/ViewModel/CurrencyExchangeViewModel.swift @@ -34,7 +34,7 @@ import CurrencyExchangeKMP } else if newState.error != nil { // TODO: Handle error } else { - guard let exchangeRates = newState.launches.first?.rates else { return } + guard let exchangeRates = newState.currencyExchange.first?.rates else { return } self?.currentDayExhangeRates = exchangeRates.map { CurrencyExchangeRateModel( @@ -55,7 +55,7 @@ import CurrencyExchangeKMP } else if newState.error != nil { // TODO: Handle error } else { - self?.lastTenDaysCurrencyExchangeModels = newState.launches.map { + self?.lastTenDaysCurrencyExchangeModels = newState.currencyExchange.map { CurrencyExchangeModel( date: $0.effectiveDate, exchangeRates: $0.rates.map { From b83fbab3b257ad1a885edba949ca4c5c47499087 Mon Sep 17 00:00:00 2001 From: timea-v Date: Tue, 28 May 2024 14:31:46 +0300 Subject: [PATCH 2/2] Fixed dark mode initial setup. --- iOSKMP/iOSKMP/Scenes/Settings/View/SettingsView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iOSKMP/iOSKMP/Scenes/Settings/View/SettingsView.swift b/iOSKMP/iOSKMP/Scenes/Settings/View/SettingsView.swift index 12f60d0..0893ea8 100644 --- a/iOSKMP/iOSKMP/Scenes/Settings/View/SettingsView.swift +++ b/iOSKMP/iOSKMP/Scenes/Settings/View/SettingsView.swift @@ -8,7 +8,7 @@ import SwiftUI struct SettingsView: View { - @AppStorage(Constants.darkModeKey) private var isDarkMode = true + @AppStorage(Constants.darkModeKey) private var isDarkMode = false @AppStorage(Constants.localeKey) private var selectedLanguage: String = LanguageType.english.identifier @Bindable private var viewModel: SettingsViewModel