Avoid hard-coded number and update the related test.
This commit is contained in:
parent
74fc570708
commit
ff77fca34d
2 changed files with 3 additions and 6 deletions
|
|
@ -42,6 +42,6 @@ fun avatarColors(userId: String): AvatarColors {
|
|||
}
|
||||
|
||||
internal fun String.toHash(): Int {
|
||||
return toList().sumOf { it.code } % 8
|
||||
return toList().sumOf { it.code } % avatarColorsLight.size
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue