mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
Fix off by one error for username colors
The hash result would only have a range of 0..7, but the css of color variants is 1..8
This commit is contained in:
parent
6b46057283
commit
b90e33b81b
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ export default React.createClass({
|
||||||
render() {
|
render() {
|
||||||
const EmojiText = sdk.getComponent('elements.EmojiText');
|
const EmojiText = sdk.getComponent('elements.EmojiText');
|
||||||
const {mxEvent} = this.props;
|
const {mxEvent} = this.props;
|
||||||
const colorNumber = hashCode(mxEvent.getSender()) % 8;
|
const colorNumber = (hashCode(mxEvent.getSender()) % 8) + 1;
|
||||||
const name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender();
|
const name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender();
|
||||||
const {msgtype} = mxEvent.getContent();
|
const {msgtype} = mxEvent.getContent();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue