|
|
@ -9,6 +9,7 @@ import {
|
|
|
|
import Column from 'flavours/glitch/components/column';
|
|
|
|
import Column from 'flavours/glitch/components/column';
|
|
|
|
import ColumnHeader from 'flavours/glitch/components/column_header';
|
|
|
|
import ColumnHeader from 'flavours/glitch/components/column_header';
|
|
|
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
|
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
|
|
|
|
|
|
import { connectPublicStream } from 'flavours/glitch/actions/streaming';
|
|
|
|
|
|
|
|
|
|
|
|
const messages = defineMessages({
|
|
|
|
const messages = defineMessages({
|
|
|
|
title: { id: 'standalone.public_title', defaultMessage: 'A look inside...' },
|
|
|
|
title: { id: 'standalone.public_title', defaultMessage: 'A look inside...' },
|
|
|
@ -35,16 +36,13 @@ export default class PublicTimeline extends React.PureComponent {
|
|
|
|
const { dispatch } = this.props;
|
|
|
|
const { dispatch } = this.props;
|
|
|
|
|
|
|
|
|
|
|
|
dispatch(refreshPublicTimeline());
|
|
|
|
dispatch(refreshPublicTimeline());
|
|
|
|
|
|
|
|
this.disconnect = dispatch(connectPublicStream());
|
|
|
|
this.polling = setInterval(() => {
|
|
|
|
|
|
|
|
dispatch(refreshPublicTimeline());
|
|
|
|
|
|
|
|
}, 3000);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
componentWillUnmount () {
|
|
|
|
componentWillUnmount () {
|
|
|
|
if (typeof this.polling !== 'undefined') {
|
|
|
|
if (this.disconnect) {
|
|
|
|
clearInterval(this.polling);
|
|
|
|
this.disconnect();
|
|
|
|
this.polling = null;
|
|
|
|
this.disconnect = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|