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
|
@ -70,8 +70,6 @@ const EMOJI_SHORTNAMES = Object.keys(EmojiData).map((key) => EmojiData[key]).sor
|
|||
};
|
||||
});
|
||||
|
||||
let instance = null;
|
||||
|
||||
function score(query, space) {
|
||||
const index = space.indexOf(query);
|
||||
if (index === -1) {
|
||||
|
@ -151,11 +149,6 @@ export default class EmojiProvider extends AutocompleteProvider {
|
|||
return '😃 ' + _t('Emoji');
|
||||
}
|
||||
|
||||
static getInstance() {
|
||||
if (instance == null) {instance = new EmojiProvider();}
|
||||
return instance;
|
||||
}
|
||||
|
||||
renderCompletions(completions: [React.Component]): ?React.Component {
|
||||
return <div className="mx_Autocomplete_Completion_container_pill">
|
||||
{ completions }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue