Merge branch 'media-modal-view-context' into 'develop'

Fix: recent change reverted view context in expanded media view link

Closes #805

See merge request soapbox-pub/soapbox-fe!987
glitchtip
marcin mikołajczak 2022-01-14 16:02:34 +00:00
commit 6358208996
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -32,6 +32,10 @@ class MediaModal extends ImmutablePureComponent {
intl: PropTypes.object.isRequired, intl: PropTypes.object.isRequired,
}; };
static contextTypes = {
router: PropTypes.object,
}
state = { state = {
index: null, index: null,
navigationHidden: false, navigationHidden: false,
@ -94,6 +98,7 @@ class MediaModal extends ImmutablePureComponent {
const acct = account.get('acct'); const acct = account.get('acct');
const statusId = status.get('id'); const statusId = status.get('id');
this.context.router.history.push(`/@${acct}/posts/${statusId}`); this.context.router.history.push(`/@${acct}/posts/${statusId}`);
this.props.onClose(null, true);
} }
} }