Skip to content

Commit

Permalink
Show Resteemed on Blog (steemit#426)
Browse files Browse the repository at this point in the history
  • Loading branch information
thebitcoiner authored and Valentine Zavgorodnev committed Oct 10, 2016
1 parent 58c7762 commit 8edf644
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions app/components/cards/PostSummary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export default class PostSummary extends React.Component {
render() {
const {currentCategory, thumbSize, ignore, onClick} = this.props;
const {post, content, pending_payout, total_payout} = this.props;
const {account} = this.props;
if (!content) return null;

const archived = content.get('mode') === 'archived'
Expand All @@ -63,6 +64,12 @@ export default class PostSummary extends React.Component {
</div>
}

if(account && account != content.get('author')) {
reblogged_by = <div className="PostSummary__reblogged_by">
<Icon name="reblog" /> Resteemed
</div>
}

const {gray, pictures, authorRepLog10, hasFlag} = content.get('stats', Map()).toJS()
const p = extractContent(immutableAccessor, content);
let desc = p.desc
Expand Down
3 changes: 2 additions & 1 deletion app/components/cards/PostsList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,13 @@ class PostsList extends React.Component {
render() {
const {posts, loading, category, emptyText} = this.props;
const {comments} = this.props
const {account} = this.props
const {thumbSize, showPost} = this.state
if (!loading && !posts.length && emptyText) {
return <Callout body={emptyText} type="success" />;
}
const renderSummary = items => items.map(({item, ignore, netVoteSign, authorRepLog10}) => <li key={item}>
<PostSummary post={item} currentCategory={category} thumbSize={thumbSize}
<PostSummary account={account} post={item} currentCategory={category} thumbSize={thumbSize}
ignore={ignore} netVoteSign={netVoteSign} authorRepLog10={authorRepLog10} onClick={this.onPostClick} />
</li>)
return (
Expand Down
1 change: 1 addition & 0 deletions app/components/pages/UserProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export default class UserProfile extends React.Component {
if (account.blog) {
tab_content = <PostsList
emptyText={`Looks like ${account.name} hasn't started blogging yet!`}
account={account.name}
posts={account.blog}
loading={fetching}
category="blog"
Expand Down

0 comments on commit 8edf644

Please sign in to comment.