MM-13421 Fix channel sidebar sometimes using old permissions (#2450)

This commit is contained in:
Harrison Healey 2018-12-12 07:38:57 -05:00 committed by Elias Nahum
parent 901a59a01b
commit 317d26ed64

View file

@ -82,8 +82,8 @@ export default class List extends PureComponent {
}
}
getSectionConfigByType = (sectionType) => {
const {canCreatePrivateChannels} = this.props;
getSectionConfigByType = (props, sectionType) => {
const {canCreatePrivateChannels} = props;
switch (sectionType) {
case SidebarSectionTypes.UNREADS:
@ -142,7 +142,7 @@ export default class List extends PureComponent {
return orderedChannelIds.map((s, i) => {
return {
...this.getSectionConfigByType(s.type),
...this.getSectionConfigByType(props, s.type),
data: s.items,
topSeparator: i !== 0,
bottomSeparator: s.items.length > 0,