Commit 752803be authored by Dan Notestein's avatar Dan Notestein
Browse files

Merge branch 'revert-image-cachebuster' into 'develop'

Remove cache buster from avatar images

See merge request !298
parents 69a3a41e f55e6180
......@@ -70,7 +70,7 @@ class PostSummary extends React.Component {
}
const {
ignore, hideCategory, net_vests, sessionId,
ignore, hideCategory, net_vests,
} = this.props;
const { post } = this.props;
if (!post) return null;
......@@ -294,7 +294,7 @@ class PostSummary extends React.Component {
}
if (!image_link && !isReply) {
image_link = `https://images.hive.blog/u/${author}/avatar${sessionId ? `?ord=${sessionId}` : ''}`;
image_link = `https://images.hive.blog/u/${author}/avatar`;
}
let thumb = null;
......@@ -357,7 +357,6 @@ class PostSummary extends React.Component {
export default connect((state, props) => {
const { post, hideCategory, nsfwPref } = props;
const net_vests = state.user.getIn(['current', 'effective_vests'], 0.0);
const sessionId = state.user.get('sessionId');
return {
post,
......@@ -366,6 +365,5 @@ export default connect((state, props) => {
blogmode: state.app.getIn(['user_preferences', 'blogmode']),
nsfwPref,
net_vests,
sessionId,
};
})(PostSummary);
......@@ -29,7 +29,7 @@ class SubscriptionsList extends React.Component {
render() {
const {
subscriptions, loading, badges, username, sessionId,
subscriptions, loading, badges, username,
} = this.props;
const badgesTypes = {
activity: [],
......@@ -76,7 +76,7 @@ class SubscriptionsList extends React.Component {
rel="noopener noreferrer"
>
<img
src={`${badge.get('url')}${sessionId ? `?ord=${sessionId}` : ''}`}
src={`${badge.get('url')}`}
alt={badge.get('title')}
title={badge.get('title')}
className="UserProfile__badge_image"
......@@ -176,14 +176,12 @@ export default connect(
const isOwnAccount = user.getIn(['current', 'username'], '') === username;
const loading = global.getIn(['subscriptions', 'loading']);
const subscriptions = global.getIn(['subscriptions', username]);
const sessionId = state.user.get('sessionId');
return {
...props,
subscriptions: subscriptions ? subscriptions.toJS() : [],
isOwnAccount,
loading,
sessionId,
};
},
(dispatch) => ({
......
......@@ -13,9 +13,9 @@ class Userpic extends Component {
render() {
if (this.props.hide) return null;
const { account, size, sessionId } = this.props;
const { account, size } = this.props;
const url = `${imageProxy()}u/${account}/avatar${size}${sessionId ? `?ord=${sessionId}` : ''}`;
const url = `${imageProxy()}u/${account}/avatar${size}`;
const style = { backgroundImage: `url(${url})` };
return <div className="Userpic" style={style} />;
}
......@@ -34,12 +34,9 @@ export default connect((state, ownProps) => {
hide = !url || !/^(https?:)\/\//.test(url);
}
const sessionId = state.user.get('sessionId');
return {
account: account === 'steemitblog' ? 'steemitdev' : account,
size: size && sizeList.indexOf(size) > -1 ? '/' + size : '',
hide,
sessionId,
};
})(Userpic);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment