MessageKit / MessageInputBar

A powerful InputAccessoryView ideal for messaging applications
MIT License
64 stars 44 forks source link

AutocompleteManager + MessageKit #7

Open mmuharem opened 6 years ago

mmuharem commented 6 years ago

Hey Nathan,

I've been able to get the AttachmentManager plugin working on MessageKit 1.0 from MessageInputBar 0.2 using example code written in the InputAccessoryBar 2.1, however, I am unable to successfully get AutoCompleteManager working. The problem that I find is that when I enter in the prefix, @, the table appears but is blank.

screen shot 2018-07-06 at 12 50 29 am

I thought this was peculiar so I then started to print out the users that were being returned in the

'func autocompleteManager(_ manager: AutocompleteManager, autocompleteSourceFor prefix: String) -> [AutocompleteCompletion] ',

and it seems to be a loop that continues to run while the prefix exists (note the scroll indicator on the right. When I started to take the screenshot, it was in the middle of scroll bar). Note, I do not find this behavior in the InputAccessoryBar project. My guess is that this would explain why the table is not being updated as the values continue to be updated too quickly for the table to register. I thought this had to do with the asynccompletions, so I removed those but to no avail.

screen shot 2018-07-06 at 12 52 43 am

Any help in this matter would be appreciated!

nathantannar4 commented 6 years ago

Thanks, I introduced this bug when trying to fix another. I'll push a fix soon.

Sent with GitHawk

nathantannar4 commented 6 years ago

Thanks for your patience. Still haven't fully released this yet 🙂

Sent with GitHawk

SD10 commented 6 years ago

This weekend this should be usable from MessageKit/MessageKit branch development. It won't be on master until the official 2.0 release. Which is likely still a few weeks away. Fwiw, I'm using the MessageKit/MessageKit branch secret-branch for my work -- this change could be merged there as well

mmuharem commented 6 years ago

I appreciate the help Nathan and Steven, and the update of MessageInputBar 0.2.1!

I was able to use thedevelopment branch and the MessageInputBar 0.2.1 in order to get a fully working autocomplete and attachment manager built.

I did try with the secret-branch but there was a slight UI issue when you do an @ mention first and then try to add a picture second - it was not showing the tableview in the top stack view as there were layout constraints that broke. Just an FYI of my experience

Again, the help was very much appreciated! Keep up the great work!

ghost commented 6 years ago

How did you make to import AutocompleteManager in a MessageKit project ?

When I import MessageInputBar and MessageKit, Xcode find 2 definition of multiples class because MessageKit use MessageInputBar

nathantannar4 commented 6 years ago

@BenBenz you have to be using MessageKit 1.1 which is in pre release on the MessageKit development branch

Sent with GitHawk

ghost commented 6 years ago

@nathantannar4 Thank you