diff options
author | Asaad Mahmood <Unknowngi@live.com> | 2015-10-23 10:53:57 +0500 |
---|---|---|
committer | Asaad Mahmood <Unknowngi@live.com> | 2015-10-23 10:53:57 +0500 |
commit | cc904a7ec73a44a337908c685bfc311bdbe1ff85 (patch) | |
tree | 6fb865bb734cad0389490e4add11f2e308fe473c /web/react/components/more_direct_channels.jsx | |
parent | 79ce0dd914713aac9d2f1332202a48e7e0d338a3 (diff) | |
parent | 02a6f6b2cd4c0a6bf32b23961557c385039ae2f2 (diff) | |
download | chat-cc904a7ec73a44a337908c685bfc311bdbe1ff85.tar.gz chat-cc904a7ec73a44a337908c685bfc311bdbe1ff85.tar.bz2 chat-cc904a7ec73a44a337908c685bfc311bdbe1ff85.zip |
Merge branch 'master' of https://github.com/mattermost/platform into ui-improvements
Diffstat (limited to 'web/react/components/more_direct_channels.jsx')
-rw-r--r-- | web/react/components/more_direct_channels.jsx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/web/react/components/more_direct_channels.jsx b/web/react/components/more_direct_channels.jsx index d5b44d86b..743e30854 100644 --- a/web/react/components/more_direct_channels.jsx +++ b/web/react/components/more_direct_channels.jsx @@ -31,7 +31,7 @@ export default class MoreDirectChannels extends React.Component { getUsersFromStore() { const currentId = UserStore.getCurrentId(); - const profiles = UserStore.getProfiles(); + const profiles = UserStore.getActiveOnlyProfiles(); const users = []; for (const id in profiles) { @@ -178,7 +178,7 @@ export default class MoreDirectChannels extends React.Component { className='profile-img pull-left' width='38' height='38' - src={`/api/v1/users/${user.id}/image?time=${user.update_at}`} + src={`/api/v1/users/${user.id}/image?time=${user.update_at}&${Utils.getSessionIndex()}`} /> <div className='more-name'> {user.username} @@ -209,12 +209,14 @@ export default class MoreDirectChannels extends React.Component { } let users = this.state.users; - if (this.state.filter !== '') { + if (this.state.filter) { + const filter = this.state.filter.toLowerCase(); + users = users.filter((user) => { - return user.username.indexOf(this.state.filter) !== -1 || - user.first_name.indexOf(this.state.filter) !== -1 || - user.last_name.indexOf(this.state.filter) !== -1 || - user.nickname.indexOf(this.state.filter) !== -1; + return user.username.toLowerCase().indexOf(filter) !== -1 || + user.first_name.toLowerCase().indexOf(filter) !== -1 || + user.last_name.toLowerCase().indexOf(filter) !== -1 || + user.nickname.toLowerCase().indexOf(filter) !== -1; }); } |