From aeb8fbcdb57559b461b6e79039edbcb2d45243c6 Mon Sep 17 00:00:00 2001 From: f0x Date: Thu, 18 Apr 2019 13:55:21 +0200 Subject: [PATCH] fix room avatars dissapearing after search --- components/chat.js | 4 ++-- components/sidebar.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/chat.js b/components/chat.js index 2d8c6ad..f728304 100644 --- a/components/chat.js +++ b/components/chat.js @@ -7,7 +7,7 @@ const debounce = require('debounce') const jdenticon = require('jdenticon') const defaultValue = require('default-value') -const Event = require('./events/Event.js') +const Event = require('./events/Event.js') jdenticon.config = { lightness: { @@ -132,7 +132,7 @@ let EventGroup = create({ return }) return
- +
{this.state.user.displayName}
{events} diff --git a/components/sidebar.js b/components/sidebar.js index 7d44d69..dc9c3cb 100644 --- a/components/sidebar.js +++ b/components/sidebar.js @@ -18,8 +18,8 @@ let RoomListItem = create({ } }, - componentDidMount() { - jdenticon.update("svg") + avatarRef: function(ref) { + jdenticon.update(ref, this.props.content.roomId) }, setRef: function(ref) { @@ -42,7 +42,7 @@ let RoomListItem = create({ className += " unread" } return
- + {this.props.content.name}
}