Fix regression: close media modal, not the status page

Clicking close goes *back* from media=1 to media-only=1
This commit is contained in:
Lim Chee Aun 2023-06-29 09:52:41 +08:00
parent 950114b9f7
commit 8efc7a226e

View file

@ -119,7 +119,10 @@ function StatusPage(params) {
instance={instance}
index={mediaIndex - 1}
onClose={() => {
if (snapStates.prevLocation) {
if (
!window.matchMedia('(min-width: calc(40em + 350px))').matches &&
snapStates.prevLocation
) {
history.back();
} else {
if (showMediaOnly) {