import { connectUserStream } from '../actions/streaming';
import { IntlProvider, addLocaleData } from 'react-intl';
import { getLocale } from '../locales';
+import { previewState as previewMediaState } from 'mastodon/features/ui/components/media_modal';
+import { previewState as previewVideoState } from 'mastodon/features/ui/components/video_modal';
import initialState from '../initial_state';
import ErrorBoundary from '../components/error_boundary';
showIntroduction: PropTypes.bool,
};
+ shouldUpdateScroll (_, { location }) {
+ return location.state !== previewMediaState && location.state !== previewVideoState;
+ }
+
render () {
const { showIntroduction } = this.props;
return (
<BrowserRouter basename='/web'>
- <ScrollContext>
+ <ScrollContext shouldUpdateScroll={this.shouldUpdateScroll}>
<Route path='/' component={UI} />
</ScrollContext>
</BrowserRouter>