chat: DMs repositioned below grouped chats

This commit is contained in:
Matilde Park 2020-04-01 01:07:32 -04:00
parent 93c881cec9
commit 04b3a2a8cf

View File

@ -68,9 +68,6 @@ export class Sidebar extends Component {
.map((each, i) => { .map((each, i) => {
let channels = groupedChannels[each] || []; let channels = groupedChannels[each] || [];
if (channels.length === 0) return; if (channels.length === 0) return;
if (groupedChannels["/~/"] && groupedChannels["/~/"].length !== 0) {
i = i + 1;
}
return( return(
<GroupItem <GroupItem
key={i} key={i}
@ -86,7 +83,7 @@ export class Sidebar extends Component {
) )
}); });
if (groupedChannels["/~/"] && groupedChannels["/~/"].length !== 0) { if (groupedChannels["/~/"] && groupedChannels["/~/"].length !== 0) {
groupedItems.unshift( groupedItems.push(
<GroupItem <GroupItem
association={"/~/"} association={"/~/"}
chatMetadata={props.associations["chat"]} chatMetadata={props.associations["chat"]}
@ -94,7 +91,7 @@ export class Sidebar extends Component {
inbox={props.inbox} inbox={props.inbox}
station={props.station} station={props.station}
unreads={props.unreads} unreads={props.unreads}
index={0} index={"/~/"}
key={"/~/"} key={"/~/"}
{...props} {...props}
/> />