PLT-3225 Fix Channel header disappears after renaming a channel (#3389)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
ae1851e633
Коммит
2f70a8baf9
@@ -2,6 +2,7 @@
|
|||||||
// See License.txt for license information.
|
// See License.txt for license information.
|
||||||
|
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
|
import TeamStore from 'stores/team_store.jsx';
|
||||||
import * as Utils from 'utils/utils.jsx';
|
import * as Utils from 'utils/utils.jsx';
|
||||||
import Client from 'utils/web_client.jsx';
|
import Client from 'utils/web_client.jsx';
|
||||||
import * as AsyncClient from 'utils/async_client.jsx';
|
import * as AsyncClient from 'utils/async_client.jsx';
|
||||||
@@ -10,6 +11,7 @@ import Constants from 'utils/constants.jsx';
|
|||||||
import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'react-intl';
|
import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'react-intl';
|
||||||
|
|
||||||
import {Modal} from 'react-bootstrap';
|
import {Modal} from 'react-bootstrap';
|
||||||
|
import {browserHistory} from 'react-router';
|
||||||
|
|
||||||
const holders = defineMessages({
|
const holders = defineMessages({
|
||||||
required: {
|
required: {
|
||||||
@@ -165,8 +167,9 @@ export default class RenameChannelModal extends React.Component {
|
|||||||
Client.updateChannel(
|
Client.updateChannel(
|
||||||
channel,
|
channel,
|
||||||
() => {
|
() => {
|
||||||
|
const team = TeamStore.getCurrent().name;
|
||||||
AsyncClient.getChannel(channel.id);
|
AsyncClient.getChannel(channel.id);
|
||||||
|
browserHistory.replace(`/${team}/channels/${channel.name}`);
|
||||||
this.handleHide();
|
this.handleHide();
|
||||||
},
|
},
|
||||||
(err) => {
|
(err) => {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user