Give autocomplete providers the room they're in
Removes the gut-wrenching that RoomView does to jam the user list into the user autocomplete provider.
This commit is contained in:
parent
8800081cb9
commit
4953d4de4d
10 changed files with 107 additions and 97 deletions
|
@ -27,8 +27,6 @@ import _sortBy from 'lodash/sortBy';
|
|||
|
||||
const ROOM_REGEX = /(?=#)(\S*)/g;
|
||||
|
||||
let instance = null;
|
||||
|
||||
function score(query, space) {
|
||||
const index = space.indexOf(query);
|
||||
if (index === -1) {
|
||||
|
@ -96,14 +94,6 @@ export default class RoomProvider extends AutocompleteProvider {
|
|||
return '💬 ' + _t('Rooms');
|
||||
}
|
||||
|
||||
static getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new RoomProvider();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
renderCompletions(completions: [React.Component]): ?React.Component {
|
||||
return <div className="mx_Autocomplete_Completion_container_pill mx_Autocomplete_Completion_container_truncate">
|
||||
{ completions }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue