Skip to content

Commit

Permalink
[MERGE] #253 -> develop
Browse files Browse the repository at this point in the history
[FIX/#253] ν”„λ‘œν•„ μˆ˜μ • λ·° / μˆ˜μ • 쑰건 μˆ˜μ •
  • Loading branch information
leeeyubin authored Sep 18, 2024
2 parents ffe8ea4 + f6cf480 commit 6c2bf2d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ class ProfileEditViewModel @Inject constructor(
}

fun updateProfile(profile: String) {
val isSameAsInitial = profile == _state.value.initialProfile
val isProfileModified = profile != _state.value.initialProfile

_state.value = _state.value.copy(
profile = profile,
initialView = false,
isModified = if (profile == _state.value.profile) _state.value.isModified else !isSameAsInitial,
initialView = if (isProfileModified) false else _state.value.initialView,
isModified = if (isProfileModified) true else _state.value.isModified,
isProfileChangedButNameSame = if (_state.value.isNameChangedOnce) false
else state.value.name == _state.value.initialName
else _state.value.name == _state.value.initialName
)
}

Expand Down

0 comments on commit 6c2bf2d

Please sign in to comment.