From 40e435c0a605bb051b167fb3d769c3336a4d367d Mon Sep 17 00:00:00 2001 From: "seona.Yang" <75965560+yang1318@users.noreply.github.com> Date: Wed, 13 Dec 2023 11:55:43 +0900 Subject: [PATCH] =?UTF-8?q?style:=20ktlint=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../and07/mindsync/ui/main/MainViewModel.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/AOS/app/src/main/java/boostcamp/and07/mindsync/ui/main/MainViewModel.kt b/AOS/app/src/main/java/boostcamp/and07/mindsync/ui/main/MainViewModel.kt index 3990c56e..93611de8 100644 --- a/AOS/app/src/main/java/boostcamp/and07/mindsync/ui/main/MainViewModel.kt +++ b/AOS/app/src/main/java/boostcamp/and07/mindsync/ui/main/MainViewModel.kt @@ -50,13 +50,14 @@ class MainViewModel fun getSpaces() { viewModelScope.launch(coroutineExceptionHandler) { profileSpaceRepository.getSpaces().collectLatest { responseSpaces -> - val newSpaces = responseSpaces.map { space -> - if (space.id == _uiState.value.nowSpace?.id) { - space.copy(isSelected = true) - } else { - space + val newSpaces = + responseSpaces.map { space -> + if (space.id == _uiState.value.nowSpace?.id) { + space.copy(isSelected = true) + } else { + space + } } - } _uiState.update { uiState -> uiState.copy( spaces = newSpaces,