Add unread notification markers (#14818)

* Add unread notification markers

Fixes #14804

* Allow IntersectionObserverArticle's children to be updated
This commit is contained in:
ThibG 2020-09-26 20:57:07 +02:00 committed by GitHub
parent 03b6b034b9
commit ff89025979
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 227 additions and 33 deletions

View file

@ -16,7 +16,7 @@ import { expandNotifications } from '../../actions/notifications';
import { fetchFilters } from '../../actions/filters';
import { clearHeight } from '../../actions/height_cache';
import { focusApp, unfocusApp } from 'mastodon/actions/app';
import { synchronouslySubmitMarkers } from 'mastodon/actions/markers';
import { synchronouslySubmitMarkers, submitMarkers, fetchMarkers } from 'mastodon/actions/markers';
import { WrappedSwitch, WrappedRoute } from './util/react_router_helpers';
import UploadArea from './components/upload_area';
import ColumnsAreaContainer from './containers/columns_area_container';
@ -265,6 +265,7 @@ class UI extends React.PureComponent {
handleWindowFocus = () => {
this.props.dispatch(focusApp());
this.props.dispatch(submitMarkers());
}
handleWindowBlur = () => {
@ -368,6 +369,7 @@ class UI extends React.PureComponent {
window.setTimeout(() => Notification.requestPermission(), 120 * 1000);
}
this.props.dispatch(fetchMarkers());
this.props.dispatch(expandHomeTimeline());
this.props.dispatch(expandNotifications());