From 0303f94bee6110ff536a7e26ad54ebd0f956c1e1 Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 30 Sep 2020 00:04:22 +0200 Subject: [PATCH] Added savePassword to Bank but now using it yet --- .../kotlin/net/dankito/banking/ui/model/BankData.kt | 2 +- .../kotlin/net/dankito/banking/ui/model/IBankData.kt | 2 ++ .../BankingiOSApp.xcdatamodel/contents | 1 + ui/BankingiOSApp/BankingiOSApp/persistence/Mapper.swift | 8 ++++---- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/BankData.kt b/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/BankData.kt index 2f81c659..4ee7cafe 100644 --- a/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/BankData.kt +++ b/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/BankData.kt @@ -37,7 +37,7 @@ open class BankData( override var tanMedia: List = listOf() - override var countDaysForWhichTransactionsAreKept: Int? = null + override var savePassword: Boolean = true override var userSetDisplayName: String? = null diff --git a/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/IBankData.kt b/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/IBankData.kt index d36eb76b..f40297cf 100644 --- a/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/IBankData.kt +++ b/ui/BankingUiCommon/src/commonMain/kotlin/net/dankito/banking/ui/model/IBankData.kt @@ -31,6 +31,8 @@ interface IBankData, TAccountTransac var selectedTanMethod: TanMethod? var tanMedia: List + var savePassword: Boolean + var userSetDisplayName: String? var technicalId: String diff --git a/ui/BankingiOSApp/BankingiOSApp/BankingiOSApp.xcdatamodeld/BankingiOSApp.xcdatamodel/contents b/ui/BankingiOSApp/BankingiOSApp/BankingiOSApp.xcdatamodeld/BankingiOSApp.xcdatamodel/contents index c7d9fb81..d9b987ce 100644 --- a/ui/BankingiOSApp/BankingiOSApp/BankingiOSApp.xcdatamodeld/BankingiOSApp.xcdatamodel/contents +++ b/ui/BankingiOSApp/BankingiOSApp/BankingiOSApp.xcdatamodeld/BankingiOSApp.xcdatamodel/contents @@ -79,6 +79,7 @@ + diff --git a/ui/BankingiOSApp/BankingiOSApp/persistence/Mapper.swift b/ui/BankingiOSApp/BankingiOSApp/persistence/Mapper.swift index 1c6dafc9..256235a0 100644 --- a/ui/BankingiOSApp/BankingiOSApp/persistence/Mapper.swift +++ b/ui/BankingiOSApp/BankingiOSApp/persistence/Mapper.swift @@ -7,9 +7,8 @@ class Mapper { func map(_ bank: PersistedBankData) -> IBankData { let mapped = BankData(bankCode: map(bank.bankCode), userName: map(bank.userName), password: map(bank.password), finTsServerAddress: map(bank.finTsServerAddress), bankName: map(bank.bankName), bic: map(bank.bic), customerName: map(bank.customerName), userId: map(bank.userId), iconUrl: bank.iconUrl, accounts: []) - - mapped.countDaysForWhichTransactionsAreKept = mapToInt(bank.countDaysForWhichTransactionsAreKept) + mapped.savePassword = bank.savePassword mapped.userSetDisplayName = bank.userSetDisplayName mapped.displayIndex = bank.displayIndex @@ -38,6 +37,7 @@ class Mapper { mapped.userId = bank.userId mapped.iconUrl = bank.iconUrl + mapped.savePassword = bank.savePassword mapped.userSetDisplayName = bank.userSetDisplayName mapped.displayIndex = bank.displayIndex @@ -61,7 +61,7 @@ class Mapper { mapped.haveAllTransactionsBeenRetrieved = account.haveAllTransactionsBeenRetrieved mapped.isAccountTypeSupportedByApplication = account.isAccountTypeSupportedByApplication - mapped.countDaysForWhichTransactionsAreKept = mapToInt(account.countDaysForWhichTransactionsAreKept) + mapped.countDaysForWhichTransactionsAreKept = map(account.countDaysForWhichTransactionsAreKept) mapped.userSetDisplayName = account.userSetDisplayName mapped.displayIndex = account.displayIndex @@ -103,7 +103,7 @@ class Mapper { mapped.haveAllTransactionsBeenRetrieved = account.haveAllTransactionsBeenRetrieved mapped.isAccountTypeSupportedByApplication = account.isAccountTypeSupportedByApplication - mapped.countDaysForWhichTransactionsAreKept = mapFromInt(account.countDaysForWhichTransactionsAreKept) + mapped.countDaysForWhichTransactionsAreKept = map(account.countDaysForWhichTransactionsAreKept)! mapped.userSetDisplayName = account.userSetDisplayName mapped.displayIndex = account.displayIndex