Skip to content
Snippets Groups Projects
Commit 26095ff3 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

a little more work to get color assignment working in the case where we have...

a little more work to get color assignment working in the case where we have more users than colors.
parent 57df4016
No related branches found
No related tags found
No related merge requests found
......@@ -53,9 +53,16 @@ export default class Activity extends Component {
// assign the user a color
if (item.user_id === user.id) {
userColors[item.user_id] = 0;
} else if (item.user_id === null) {
// just skip this scenario, we handle this differently
} else {
userColors[item.user_id] = colors[currColor];
currColor++;
// if we hit the end of the colors list then just go back to the beginning again
if (currColor >= colors.length) {
currColor = 0;
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment