From 8769c535dca606042cef854bcc677b5e178cdb55 Mon Sep 17 00:00:00 2001 From: jiwon2724 Date: Tue, 6 Aug 2024 21:18:53 +0900 Subject: [PATCH] =?UTF-8?q?[chore]=20=EC=BD=94=EB=93=9C=EB=A6=AC=EB=B7=B0?= =?UTF-8?q?=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pokitmons/pokit/settings/SettingViewModel.kt | 13 ++++++------- .../pokit/settings/setting/SettingsScreen.kt | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/feature/settings/src/main/java/pokitmons/pokit/settings/SettingViewModel.kt b/feature/settings/src/main/java/pokitmons/pokit/settings/SettingViewModel.kt index a230b5ff..552c0b94 100644 --- a/feature/settings/src/main/java/pokitmons/pokit/settings/SettingViewModel.kt +++ b/feature/settings/src/main/java/pokitmons/pokit/settings/SettingViewModel.kt @@ -26,16 +26,16 @@ class SettingViewModel @Inject constructor( ) : ViewModel() { private var duplicateNicknameJob: Job? = null - private val _isBottomSheetHide: MutableState = mutableStateOf(false) - val isBottomSheetHide: Boolean - get() = _isBottomSheetHide.value + private val _isBottomSheetVisible: MutableState = mutableStateOf(false) + val isBottomSheetVisible: Boolean + get() = _isBottomSheetVisible.value private val _inputNicknameState = MutableStateFlow(DuplicateNicknameState()) val inputNicknameState: StateFlow get() = _inputNicknameState.asStateFlow() fun changeBottomSheetHideState() { - _isBottomSheetHide.value = !_isBottomSheetHide.value + _isBottomSheetVisible.value = !_isBottomSheetVisible.value } fun inputText(inputNickname: String) { @@ -61,15 +61,14 @@ class SettingViewModel @Inject constructor( } fun editNickname() { - Log.d("!! : ", "call") viewModelScope.launch { when (val editNicknameResult = editNicknameUseCase.editNickname(_inputNicknameState.value.nickname)) { is PokitResult.Success -> { - Log.d("!! : ", editNicknameResult.result.toString()) + } is PokitResult.Error -> { - Log.d("!! : ", editNicknameResult.error.toString()) + } } } diff --git a/feature/settings/src/main/java/pokitmons/pokit/settings/setting/SettingsScreen.kt b/feature/settings/src/main/java/pokitmons/pokit/settings/setting/SettingsScreen.kt index babd0ab5..750dddcb 100644 --- a/feature/settings/src/main/java/pokitmons/pokit/settings/setting/SettingsScreen.kt +++ b/feature/settings/src/main/java/pokitmons/pokit/settings/setting/SettingsScreen.kt @@ -53,7 +53,7 @@ fun SettingsScreen( // TODO 회원탈퇴 분기 PokitBottomSheet( onHideBottomSheet = { }, - show = settingViewModel.isBottomSheetHide + show = settingViewModel.isBottomSheetVisible ) { TwoButtonBottomSheetContent( title = stringResource(id = StringResource.logout_title),