This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export function TextualCompletion({
1313 < div style = { { width : '100%' } } >
1414 < span > { title } </ span >
1515 < em > { subtitle } </ em >
16- < span style = { { color : 'gray' } } > { description } </ span >
16+ < span style = { { color : 'gray' , float : 'right' } } > { description } </ span >
1717 </ div >
1818 ) ;
1919}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import Q from 'q';
44import MatrixClientPeg from '../MatrixClientPeg' ;
55import Fuse from 'fuse.js' ;
66import { TextualCompletion } from './Components' ;
7+ import { getDisplayAliasForRoom } from '../MatrixTools' ;
78
89const ROOM_REGEX = / (? = # ) ( [ ^ \s ] * ) / g;
910
@@ -27,16 +28,18 @@ export default class RoomProvider extends AutocompleteProvider {
2728 // the only reason we need to do this is because Fuse only matches on properties
2829 this . fuse . set ( client . getRooms ( ) . filter ( room => ! ! room ) . map ( room => {
2930 return {
31+ room : room ,
3032 name : room . name ,
3133 roomId : room . roomId ,
3234 aliases : room . getAliases ( ) ,
3335 } ;
3436 } ) ) ;
3537 completions = this . fuse . search ( command [ 0 ] ) . map ( room => {
38+ let displayAlias = getDisplayAliasForRoom ( room . room ) || room . roomId ;
3639 return {
37- completion : room . roomId ,
40+ completion : displayAlias ,
3841 component : (
39- < TextualCompletion title = { room . name } subtitle = { room . roomId } />
42+ < TextualCompletion title = { room . name } description = { displayAlias } />
4043 ) ,
4144 range,
4245 } ;
You can’t perform that action at this time.
0 commit comments