Remove routerHistory parameters from composer actions (#31077)
This commit is contained in:
parent
adadfdbc03
commit
e768b23aa9
18 changed files with 91 additions and 100 deletions
|
@ -22,7 +22,7 @@ type LocationState = MastodonLocationState | null | undefined;
|
|||
|
||||
type HistoryPath = Path | LocationDescriptor<LocationState>;
|
||||
|
||||
const browserHistory = createBrowserHistory<LocationState>();
|
||||
export const browserHistory = createBrowserHistory<LocationState>();
|
||||
const originalPush = browserHistory.push.bind(browserHistory);
|
||||
const originalReplace = browserHistory.replace.bind(browserHistory);
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ class Status extends ImmutablePureComponent {
|
|||
|
||||
handleHotkeyReply = e => {
|
||||
e.preventDefault();
|
||||
this.props.onReply(this._properStatus(), this.props.history);
|
||||
this.props.onReply(this._properStatus());
|
||||
};
|
||||
|
||||
handleHotkeyFavourite = () => {
|
||||
|
@ -281,7 +281,7 @@ class Status extends ImmutablePureComponent {
|
|||
|
||||
handleHotkeyMention = e => {
|
||||
e.preventDefault();
|
||||
this.props.onMention(this._properStatus().get('account'), this.props.history);
|
||||
this.props.onMention(this._properStatus().get('account'));
|
||||
};
|
||||
|
||||
handleHotkeyOpen = () => {
|
||||
|
|
|
@ -118,7 +118,7 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
const { signedIn } = this.props.identity;
|
||||
|
||||
if (signedIn) {
|
||||
this.props.onReply(this.props.status, this.props.history);
|
||||
this.props.onReply(this.props.status);
|
||||
} else {
|
||||
this.props.onInteractionModal('reply', this.props.status);
|
||||
}
|
||||
|
@ -157,15 +157,15 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
};
|
||||
|
||||
handleDeleteClick = () => {
|
||||
this.props.onDelete(this.props.status, this.props.history);
|
||||
this.props.onDelete(this.props.status);
|
||||
};
|
||||
|
||||
handleRedraftClick = () => {
|
||||
this.props.onDelete(this.props.status, this.props.history, true);
|
||||
this.props.onDelete(this.props.status, true);
|
||||
};
|
||||
|
||||
handleEditClick = () => {
|
||||
this.props.onEdit(this.props.status, this.props.history);
|
||||
this.props.onEdit(this.props.status);
|
||||
};
|
||||
|
||||
handlePinClick = () => {
|
||||
|
@ -173,11 +173,11 @@ class StatusActionBar extends ImmutablePureComponent {
|
|||
};
|
||||
|
||||
handleMentionClick = () => {
|
||||
this.props.onMention(this.props.status.get('account'), this.props.history);
|
||||
this.props.onMention(this.props.status.get('account'));
|
||||
};
|
||||
|
||||
handleDirectClick = () => {
|
||||
this.props.onDirect(this.props.status.get('account'), this.props.history);
|
||||
this.props.onDirect(this.props.status.get('account'));
|
||||
};
|
||||
|
||||
handleMuteClick = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue