Skip to content

Commit

Permalink
Limit amount of avatars shown #217
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLitt committed Jul 15, 2015
1 parent 489bbba commit f8fe3bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions build/main.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,7 @@ module.exports = exports = React.createClass({
return React.createElement('div', null, this.state.conversations.map(function (conversation) {
var avatars = conversation.avatars;

return React.createElement('div', { style: listingStyle }, React.createElement('p', { style: titleStyle }, conversation.title), React.createElement('div', { style: imageWrapperStyle },
/* Todo: Limit to 8 or so avatars */
conversation.avatars.map(function (avatar) {
return React.createElement('div', { style: listingStyle }, React.createElement('p', { style: titleStyle }, conversation.title), React.createElement('div', { style: imageWrapperStyle }, conversation.avatars.slice(0, 5).map(function (avatar) {
return React.createElement('img', { style: imgStyle, key: avatars.indexOf(avatar), src: avatar });
})), React.createElement('span', { style: dateStyle }, 'Updated ', conversation.date, ' ago'), React.createElement('div', { style: commentStyle }, React.createElement('i', { className: 'fa fa-comment' }), ' ', conversation.notes.length));
}));
Expand Down
3 changes: 1 addition & 2 deletions js/components/conversations.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ module.exports = exports = React.createClass({
<div style={listingStyle}>
<p style={titleStyle}>{conversation.title}</p>
<div style={imageWrapperStyle}>
{/* Todo: Limit to 8 or so avatars */}
{conversation.avatars.map(function (avatar) {
{conversation.avatars.slice(0, 5).map(function (avatar) {
return <img style={imgStyle} key={avatars.indexOf(avatar)} src={avatar} />
})}
</div>
Expand Down

0 comments on commit f8fe3bd

Please sign in to comment.