Make streaming API use one pattern-matching redis pubsub connection
Refresh timelines when streaming API reconnects in the UI
This commit is contained in:
parent
9d5fb49cd8
commit
02e91a96dd
3 changed files with 74 additions and 36 deletions
|
@ -6,7 +6,7 @@ import {
|
|||
deleteFromTimelines,
|
||||
refreshTimeline
|
||||
} from '../actions/timelines';
|
||||
import { updateNotifications } from '../actions/notifications';
|
||||
import { updateNotifications, refreshNotifications } from '../actions/notifications';
|
||||
import createBrowserHistory from 'history/lib/createBrowserHistory';
|
||||
import {
|
||||
applyRouterMiddleware,
|
||||
|
@ -80,6 +80,11 @@ const Mastodon = React.createClass({
|
|||
store.dispatch(updateNotifications(JSON.parse(data.payload), getMessagesForLocale(locale), locale));
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
reconnected () {
|
||||
store.dispatch(refreshTimeline('home'));
|
||||
store.dispatch(refreshNotifications());
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue