Properly checked for channel change before closing LHS (#2833)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
6abb2275dd
Коммит
157438545c
@@ -162,7 +162,7 @@ export default class Sidebar extends React.Component {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
componentDidUpdate() {
|
componentDidUpdate(prevProps, prevState) {
|
||||||
this.updateTitle();
|
this.updateTitle();
|
||||||
this.updateUnreadIndicators();
|
this.updateUnreadIndicators();
|
||||||
if (!Utils.isMobile()) {
|
if (!Utils.isMobile()) {
|
||||||
@@ -170,8 +170,10 @@ export default class Sidebar extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// close the LHS on mobile when you change channels
|
// close the LHS on mobile when you change channels
|
||||||
$('.app__body .inner-wrap').removeClass('move--right');
|
if (this.state.activeId !== prevState.activeId) {
|
||||||
$('.app__body .sidebar--left').removeClass('move--right');
|
$('.app__body .inner-wrap').removeClass('move--right');
|
||||||
|
$('.app__body .sidebar--left').removeClass('move--right');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
window.removeEventListener('resize', this.handleResize);
|
window.removeEventListener('resize', this.handleResize);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user