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:
David Baker 2017-11-02 17:51:08 +00:00
parent 8800081cb9
commit 4953d4de4d
10 changed files with 107 additions and 97 deletions

View file

@ -109,8 +109,6 @@ const COMMANDS = [
const COMMAND_RE = /(^\/\w*)/g;
let instance = null;
export default class CommandProvider extends AutocompleteProvider {
constructor() {
super(COMMAND_RE);
@ -142,12 +140,6 @@ export default class CommandProvider extends AutocompleteProvider {
return '*️⃣ ' + _t('Commands');
}
static getInstance(): CommandProvider {
if (instance === null) instance = new CommandProvider();
return instance;
}
renderCompletions(completions: [React.Component]): ?React.Component {
return <div className="mx_Autocomplete_Completion_container_block">
{ completions }