The message list will shake.
std-s opened this issue · comments
@ekazaev Hi,
In the case of keyboard activation, after the preview disappears, the message list will shake.
version: 1.3.0
RPReplay_Final1685089914.MP4
Hi @std-s
Thanks for the question. And what is the problem with it? It is the matter of the keyboard handling rather than the library itself. I dont see it as anything to worry about tbh.
The effect you see is that there is typing indicator appears and disappears while you are showing preview. You can controll it on your side and not populate the updates while you are showing the preview. The world is your oyster.
RPReplay_Final1685530897.mov
a. After starting the example app, you need to activate the keyboard immediately, and then press and hold the message. You cannot do the preview operation before activating the keyboard.
b. If you perform a preview action when the keyboard is put away, there will be no jitter later.
c. Please help, I've spent a lot of time debugging this to no avail.
RPReplay_Final1685587878.mov
@std-s Having a quick look I have more information to share. It seems that it is yet another hello from Apple and I have the feeling that it appeared in the recent IOS versions. Sometimes (not always) the app is receiving the incorrect original position of the keyboard when the preview is disappearing, and then it receives the correct one as well. What you can do is delay the removal of the .showingPreview
for a few milliseconds and then filtering it out to avoid the incorrect keyboard position value in keyboardWillChangeFrame
using !currentInterfaceActions.options.contains(.showingPreview)
.
Try to experiment and see how you can filter out that incorrect keyboard message. But yet again. This is not a library issue. UICollectionView does what you tell it to do. But my assumption is that what you are fighting can be fixed in in the next version of IOS. Check the solution in the IOS 15 if you support it. It seems there they are sending you a full cycle of the keyboard messages.
When I have time I have a closer look in attempt to tackle that behaviour in the Example app. But overall it doesn't bother me.
okay ,i'll give it a try.