Remove lag when starting user autocompletion

We realistically don't need to interate over every user when typing '@',
since this is not usefull for the user and create some lag.
This commit is contained in:
Carl Schwan
2021-12-25 18:31:22 +01:00
parent 26f0cd4cf4
commit ca2b5fde8e
3 changed files with 8 additions and 3 deletions

View File

@@ -268,7 +268,7 @@ ToolBar {
completionMenu.completionType = completionInfo.type
if (completionInfo.type === ChatDocumentHandler.User) {
completionMenu.model = currentRoom.getUsers(completionInfo.keyword);
completionMenu.model = currentRoom.getUsers(completionInfo.keyword, 10);
} else if (completionInfo.type === ChatDocumentHandler.Command) {
completionMenu.model = CommandModel.filterModel(completionInfo.keyword);
} else {