Skip to content

Commit

Permalink
refactor: Simplify profile image selection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
toychip committed Aug 19, 2024
1 parent 0c07be4 commit 1523a2e
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,11 @@ class DefaultPickService(
pickerGender: MemberGender?,
pickerFullName: String?,
): String {
return if (pickerFullName != null) {
pickerProfileImageUrl
} else {
when (pickerGender) {
MemberGender.MALE -> profileImageProperties.male
MemberGender.FEMALE -> profileImageProperties.female
else -> profileImageProperties.unknown
}
return when {
pickerFullName != null -> pickerProfileImageUrl
pickerGender == MemberGender.MALE -> profileImageProperties.male
pickerGender == MemberGender.FEMALE -> profileImageProperties.female
else -> profileImageProperties.unknown
}
}

Expand Down

0 comments on commit 1523a2e

Please sign in to comment.