parent
e8dfef4bd4
commit
f7d978b7e3
5 changed files with 22 additions and 18 deletions
|
@ -817,12 +817,16 @@ export function insertFeaturedTagCompose(position, data) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function insertReferenceCompose(position, url, attributeType) {
|
export function insertReferenceCompose(position, url, attributeType, routerHistory) {
|
||||||
return {
|
return (dispatch, getState) => {
|
||||||
|
dispatch({
|
||||||
type: COMPOSE_REFERENCE_INSERT,
|
type: COMPOSE_REFERENCE_INSERT,
|
||||||
position,
|
position,
|
||||||
url,
|
url,
|
||||||
attributeType,
|
attributeType,
|
||||||
|
});
|
||||||
|
|
||||||
|
ensureComposeIsVisible(getState, routerHistory);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -290,11 +290,11 @@ class StatusActionBar extends ImmutablePureComponent {
|
||||||
};
|
};
|
||||||
|
|
||||||
handleReference = () => {
|
handleReference = () => {
|
||||||
this.props.onReference(this.props.status);
|
this.props.onReference(this.props.status, this.props.history);
|
||||||
};
|
};
|
||||||
|
|
||||||
handleQuote = () => {
|
handleQuote = () => {
|
||||||
this.props.onQuote(this.props.status);
|
this.props.onQuote(this.props.status, this.props.history);
|
||||||
};
|
};
|
||||||
|
|
||||||
handleHideClick = () => {
|
handleHideClick = () => {
|
||||||
|
|
|
@ -203,12 +203,12 @@ const mapDispatchToProps = (dispatch, { intl, contextType }) => ({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onReference (status) {
|
onReference (status, router) {
|
||||||
dispatch(insertReferenceCompose(0, status.get('url'), 'BT'));
|
dispatch(insertReferenceCompose(0, status.get('url'), 'BT', router));
|
||||||
},
|
},
|
||||||
|
|
||||||
onQuote (status) {
|
onQuote (status, router) {
|
||||||
dispatch(insertReferenceCompose(0, status.get('url'), 'QT'));
|
dispatch(insertReferenceCompose(0, status.get('url'), 'QT', router));
|
||||||
},
|
},
|
||||||
|
|
||||||
onTranslate (status) {
|
onTranslate (status) {
|
||||||
|
|
|
@ -225,11 +225,11 @@ class ActionBar extends PureComponent {
|
||||||
};
|
};
|
||||||
|
|
||||||
handleReference = () => {
|
handleReference = () => {
|
||||||
this.props.onReference(this.props.status);
|
this.props.onReference(this.props.status, this.props.history);
|
||||||
};
|
};
|
||||||
|
|
||||||
handleQuote = () => {
|
handleQuote = () => {
|
||||||
this.props.onQuote(this.props.status);
|
this.props.onQuote(this.props.status, this.props.history);
|
||||||
};
|
};
|
||||||
|
|
||||||
handleEmojiPick = (data) => {
|
handleEmojiPick = (data) => {
|
||||||
|
|
|
@ -368,12 +368,12 @@ class Status extends ImmutablePureComponent {
|
||||||
this.handleReblogClick(status, e, true);
|
this.handleReblogClick(status, e, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
handleReference = (status) => {
|
handleReference = (status, router) => {
|
||||||
this.props.dispatch(insertReferenceCompose(0, status.get('url'), 'BT'));
|
this.props.dispatch(insertReferenceCompose(0, status.get('url'), 'BT', router));
|
||||||
};
|
};
|
||||||
|
|
||||||
handleQuote = (status) => {
|
handleQuote = (status, router) => {
|
||||||
this.props.dispatch(insertReferenceCompose(0, status.get('url'), 'QT'));
|
this.props.dispatch(insertReferenceCompose(0, status.get('url'), 'QT', router));
|
||||||
};
|
};
|
||||||
|
|
||||||
handleBookmarkClick = (status) => {
|
handleBookmarkClick = (status) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue