nathantannar4 / InputBarAccessoryView

A simple and easily customizable InputAccessoryView for making powerful input bars with autocomplete and attachments
MIT License
1.17k stars 229 forks source link

Consider custom middleContentView height #265

Closed PhilipDukhov closed 3 days ago

PhilipDukhov commented 3 months ago

This fixes #264

I'm not sure if it's a proper fix for the library, but it works good in my case.

I believe the code above the fix is still needed to manage inputTextView.isScrollEnabled state with the height constraint, so it shouldn't be placed in else statement.

https://github.com/nathantannar4/InputBarAccessoryView/blob/093bdc71dc26bfcdaa71352d5ff0cd84b9b8d427/Sources/InputBarAccessoryView.swift#L571-L586

PhilipDukhov commented 2 months ago

I think we should optimize this tho, so that we skip calculating inputTextViewHeight if the middleContentView != inputTextView

you mean caching middleContentView.intrinsicContentSize operation result?

do you think it should be done in this PR?

Even with your approval I don't have access to merge this in

PhilipDukhov commented 3 days ago

@nathantannar4 please check the last comment!