Chatto icon indicating copy to clipboard operation
Chatto copied to clipboard

Refresh input bar

Open dfaizmaulana opened this issue 5 years ago • 1 comments

Hi, I wanted to have multiple input items which is enable to select depend on the last message received. Currently i manage to observe last message then force it to refresh using super.viewDidLoad(), the problem is the input bar will be duplicated. So is it possible to make inputView refresh with new createChatInputView? I'm pretty new for swift so i'm really appreciate any direction.

Thank you.

dfaizmaulana avatar Feb 05 '19 16:02 dfaizmaulana

@dfaizmaulana You have access to BaseChatViewController.inputBarContainer and you can manage it directly. createChatInputView it's just a convenient function to provide your own input bar that is put into inputBarContainer.

Current BasicChatInputBarPresenter implementation don't allow to dynamically change input items. So, when you need to replace input bar you can remove subviews from inputBarContainer and add your new input bar manually. Also, make sure that your input bar takes all available space in a container (you can use layout anchors for this purpose).

AntonPalich avatar Feb 05 '19 20:02 AntonPalich