chat: always show DMs, add 'no DM' text

This commit is contained in:
Matilde Park 2020-07-16 13:51:23 -04:00
parent 62405ce5d0
commit dbfff9e94b
2 changed files with 18 additions and 15 deletions

View File

@ -65,6 +65,10 @@ export class GroupItem extends Component {
);
});
if (channelItems.length === 0) {
channelItems.push(<p className="gray2 mt4 f9 tc">No direct messages</p>);
}
let dmLink = <div />;
if (props.index === 'dm') {

View File

@ -86,7 +86,7 @@ export class Sidebar extends Component {
/>
);
});
if (groupedChannels['dm'] && groupedChannels['dm'].length !== 0) {
// add direct messages after groups
groupedItems.push(
<GroupItem
association={'dm'}
@ -100,7 +100,6 @@ export class Sidebar extends Component {
{...props}
/>
);
}
return (
<div