From 2a6e3dff15f77e1b7a539c27ec946cbf1b681ee9 Mon Sep 17 00:00:00 2001 From: LEE YOU BIN Date: Sun, 8 Sep 2024 23:48:00 +0900 Subject: [PATCH] =?UTF-8?q?[FEAT/#226]=20=ED=94=84=EB=A1=9C=ED=95=84=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=ED=99=9C=EC=84=B1=ED=99=94=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/terning/feature/mypage/profileedit/ProfileEditState.kt | 1 + .../terning/feature/mypage/profileedit/ProfileEditViewModel.kt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditState.kt b/feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditState.kt index a8f1d2b96..7048e20a7 100644 --- a/feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditState.kt +++ b/feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditState.kt @@ -4,6 +4,7 @@ data class ProfileEditState( val name: String = "", val initialName: String = "", val profile: String = "", + val initialProfile: String = "", val initialView: Boolean = true, val isButtonValid: Boolean = false, val authType: String = "", diff --git a/feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditViewModel.kt b/feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditViewModel.kt index 5516b79c2..2ed62c6ce 100644 --- a/feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditViewModel.kt +++ b/feature/src/main/java/com/terning/feature/mypage/profileedit/ProfileEditViewModel.kt @@ -37,6 +37,7 @@ class ProfileEditViewModel @Inject constructor( name = initialName, initialName = initialName, profile = initialProfile, + initialProfile = initialProfile ) } @@ -50,7 +51,7 @@ class ProfileEditViewModel @Inject constructor( fun updateProfile(profile: String) { _state.value = _state.value.copy( profile = profile, - initialView = false + initialView = profile == _state.value.initialProfile ) }