@@ -284,6 +284,10 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
284284 }
285285 } ;
286286
287+ private onStartChat = ( ) => {
288+ dis . dispatch ( { action : "view_create_chat" } ) ;
289+ } ;
290+
287291 private onExplore = ( ) => {
288292 dis . fire ( Action . ViewRoomDirectory ) ;
289293 } ;
@@ -335,8 +339,9 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
335339 return p ;
336340 } , [ ] as TagID [ ] ) ;
337341
338- // show a skeleton UI if the user is in no rooms
339- const showSkeleton = Object . values ( RoomListStore . instance . unfilteredLists ) . every ( list => ! list ?. length ) ;
342+ // show a skeleton UI if the user is in no rooms and they are not filtering
343+ const showSkeleton = ! this . state . isNameFiltering &&
344+ Object . values ( RoomListStore . instance . unfilteredLists ) . every ( list => ! list ?. length ) ;
340345
341346 for ( const orderedTagId of tagOrder ) {
342347 const orderedRooms = this . state . sublists [ orderedTagId ] || [ ] ;
@@ -376,7 +381,18 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
376381 if ( this . state . isNameFiltering ) {
377382 explorePrompt = < div className = "mx_RoomList_explorePrompt" >
378383 < div > { _t ( "Can't see what you’re looking for?" ) } </ div >
379- < AccessibleButton kind = "link" onClick = { this . onExplore } >
384+ < AccessibleButton
385+ className = "mx_RoomList_explorePrompt_startChat"
386+ kind = "link"
387+ onClick = { this . onStartChat }
388+ >
389+ { _t ( "Start a new chat" ) }
390+ </ AccessibleButton >
391+ < AccessibleButton
392+ className = "mx_RoomList_explorePrompt_explore"
393+ kind = "link"
394+ onClick = { this . onExplore }
395+ >
380396 { _t ( "Explore all public rooms" ) }
381397 </ AccessibleButton >
382398 </ div > ;
@@ -388,7 +404,18 @@ export default class RoomList extends React.PureComponent<IProps, IState> {
388404 if ( unfilteredRooms . length < 1 && unfilteredHistorical < 1 ) {
389405 explorePrompt = < div className = "mx_RoomList_explorePrompt" >
390406 < div > { _t ( "Use the + to make a new room or explore existing ones below" ) } </ div >
391- < AccessibleButton kind = "link" onClick = { this . onExplore } >
407+ < AccessibleButton
408+ className = "mx_RoomList_explorePrompt_startChat"
409+ kind = "link"
410+ onClick = { this . onStartChat }
411+ >
412+ { _t ( "Start a new chat" ) }
413+ </ AccessibleButton >
414+ < AccessibleButton
415+ className = "mx_RoomList_explorePrompt_explore"
416+ kind = "link"
417+ onClick = { this . onExplore }
418+ >
392419 { _t ( "Explore all public rooms" ) }
393420 </ AccessibleButton >
394421 </ div > ;
0 commit comments