Add post list container to hold mounted post lists for faster rendering/channel switching.

Этот коммит содержится в:
JoramWilander
2015-09-08 10:11:57 -04:00
родитель 5b3ee66dc3
Коммит 5c0680397d
8 изменённых файлов: 251 добавлений и 107 удалений

Просмотреть файл

@@ -64,9 +64,14 @@ export default class ChannelHeader extends React.Component {
handleLeave() {
Client.leaveChannel(this.state.channel.id,
function handleLeaveSuccess() {
AppDispatcher.handleViewAction({
type: ActionTypes.LEAVE_CHANNEL,
id: this.state.channel.id
});
const townsquare = ChannelStore.getByName('town-square');
Utils.switchChannel(townsquare);
},
}.bind(this),
function handleLeaveError(err) {
AsyncClient.dispatchError(err, 'handleLeave');
}