Fix checks to show prompt to start new chats

We compared the length of the list rooms but not historical or favourite.

Caught by new version of typescript when I tried to upgrade.
pull/21833/head
David Baker 2021-09-15 15:08:23 +01:00
parent f6b0b12c60
commit 0f98c9127d
1 changed files with 1 additions and 1 deletions

View File

@ -547,7 +547,7 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
const unfilteredHistorical = unfilteredLists[DefaultTagID.Archived] || [];
const unfilteredFavourite = unfilteredLists[DefaultTagID.Favourite] || [];
// show a prompt to join/create rooms if the user is in 0 rooms and no historical
if (unfilteredRooms.length < 1 && unfilteredHistorical < 1 && unfilteredFavourite < 1) {
if (unfilteredRooms.length < 1 && unfilteredHistorical.length < 1 && unfilteredFavourite.length < 1) {
explorePrompt = <div className="mx_RoomList_explorePrompt">
<div>{ _t("Use the + to make a new room or explore existing ones below") }</div>
<AccessibleButton