Skip to content

Commit

Permalink
[FEAT/#226] 프로필 수정 활성화 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Sep 8, 2024
1 parent 2b389c8 commit 2a6e3df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class ProfileEditViewModel @Inject constructor(
name = initialName,
initialName = initialName,
profile = initialProfile,
initialProfile = initialProfile
)
}

Expand All @@ -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
)
}

Expand Down

0 comments on commit 2a6e3df

Please sign in to comment.