Skip to content

Commit

Permalink
compose box: Rename 'message' to 'completedText' in 'handleMessageAut…
Browse files Browse the repository at this point in the history
…ocomplete'.

Renames the 'message' parameter in the 'handleMessageAutocomplete'
method in 'ComposeBox' to 'completedText' for better clarity, so
that we don't think of the 'Message' type.
  • Loading branch information
agrawal-d committed Jul 4, 2020
1 parent 3cb3ea1 commit f044185
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/compose/ComposeBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,12 @@ class ComposeBox extends PureComponent<Props, State> {
};

// See JSDoc on 'onAutocomplete' in 'AutocompleteView.js'.
handleMessageAutocomplete = (message: string, completion: string, lastWordPrefix: string) => {
this.setMessageInputValue(message);
handleMessageAutocomplete = (
completedText: string,
completion: string,
lastWordPrefix: string,
) => {
this.setMessageInputValue(completedText);

if (lastWordPrefix === '@') {
if (this.mentionWarnings.current) {
Expand Down

0 comments on commit f044185

Please sign in to comment.