Implemented setting User.displayIndex

This commit is contained in:
dankito 2024-09-05 23:04:14 +02:00
parent dd95a66acd
commit 84370e71e9
1 changed files with 2 additions and 0 deletions

View File

@ -92,6 +92,8 @@ class BankingService(
private suspend fun handleSuccessfulGetAccountDataResponse(response: GetAccountDataResponse) {
try {
val newUser = response.user
newUser.displayIndex = uiState.userAccounts.value.size
val newUserEntity = bankingRepository.persistUserAccount(newUser)
log.info { "Saved user account $newUserEntity with ${newUserEntity.accounts.flatMap { it.bookedTransactionsEntities }.size} transactions" }