diff options
author | =Corey Hulen <corey@hulen.com> | 2016-01-25 11:23:55 -0500 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-01-25 11:23:55 -0500 |
commit | ea71731f838fc010cfc7511c09875184d1b2396b (patch) | |
tree | 7841e6908a42badb5171760426d2ca5898a76bda /web/react/components/suggestion/at_mention_provider.jsx | |
parent | 6b534f1b0dae2614ec267a82f1c4dc1b096b7b1c (diff) | |
parent | 5478ea34e436109ece417c3704a1fa36d3aba4a5 (diff) | |
download | chat-ea71731f838fc010cfc7511c09875184d1b2396b.tar.gz chat-ea71731f838fc010cfc7511c09875184d1b2396b.tar.bz2 chat-ea71731f838fc010cfc7511c09875184d1b2396b.zip |
merging
Diffstat (limited to 'web/react/components/suggestion/at_mention_provider.jsx')
-rw-r--r-- | web/react/components/suggestion/at_mention_provider.jsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/web/react/components/suggestion/at_mention_provider.jsx b/web/react/components/suggestion/at_mention_provider.jsx index 8c2893448..e502c981d 100644 --- a/web/react/components/suggestion/at_mention_provider.jsx +++ b/web/react/components/suggestion/at_mention_provider.jsx @@ -5,6 +5,8 @@ import SuggestionStore from '../../stores/suggestion_store.jsx'; import UserStore from '../../stores/user_store.jsx'; import * as Utils from '../../utils/utils.jsx'; +const MaxUserSuggestions = 40; + class AtMentionSuggestion extends React.Component { render() { const {item, isSelection, onClick} = this.props; @@ -78,6 +80,10 @@ export default class AtMentionProvider { if (user.username.startsWith(usernamePrefix)) { filtered.push(user); } + + if (filtered.length >= MaxUserSuggestions) { + break; + } } // add dummy users to represent the @all and @channel special mentions |