#5953 Fix for conversation animation when keyboard is shown #6006
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First time contributor checklist
Contributor checklist
Description
This fixes issue #5953 when opening the keyboard on a conversation. What is happening is that items that will be pushed out of the frame are removed before the system animation begins so when it starts they are faded out as removed items. With this fix, those elements are added to the animation queue so they are present when the animation beings.
Before :
before.mov
After:
after.mov
I added a new parameter to the signature of the
updateContentInsetfunction for the animation duration with a default value of the inherited duration temporarily. The final implementation should contemplate updating theInputAccessoryViewPlaceholderDelegateprotocol, adding the animation duration argument to the methodsinputAccessoryPlaceholderKeyboardDidPresentandinputAccessoryPlaceholderKeyboardDidDismissfunctions in order to pass that value to theupdateContentInsetmethod. I avoided this in order to keep this PR short and have room for discussion.