Fix a crashing issue with autocomplete building

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2019-01-24 11:58:32 +01:00
parent f5e30bbfda
commit 5652dca771

View File

@ -459,13 +459,15 @@ public class ChatController extends BaseController implements MessagesListAdapte
AutocompletePresenter<Mention> presenter = new MentionAutocompletePresenter(getApplicationContext(), roomToken);
AutocompleteCallback<Mention> callback = new MentionAutocompleteCallback();
mentionAutocomplete = Autocomplete.<Mention>on(messageInput)
.with(elevation)
.with(backgroundDrawable)
.with(new CharPolicy('@'))
.with(presenter)
.with(callback)
.build();
if (mentionAutocomplete != null) {
mentionAutocomplete = Autocomplete.<Mention>on(messageInput)
.with(elevation)
.with(backgroundDrawable)
.with(new CharPolicy('@'))
.with(presenter)
.with(callback)
.build();
}
}
@Override