On very performing android devices, when we have 300 messages in chat, and that we try to open an Action Sheet, the opening animation is very laggy. On average iPhone, itâs very fast. I donât know if you have any idea of what impact Android ? (those are Android 7 & 9 devices. Motorola and Samsung. The same lag).
How to detect that user scroll from bottom to top and reach top of the messages ?
That is because, unfortunately, some of Androids webviews are slow. But 300 messages at a time sounds like overload. It is better to try use Virtual List of Infinite Scroll and to load more messages on scroll.
With usual scroll handler on messages content
$('.messages-content').on('scroll', function(e) {
var scrollTop = $('.messages-content').scrollTop();
if (scrollTop <= 0) {
// we are on top
}
});
Hi, can you give me an idea, how to combine components âmessagesâ and âvirtual listâ?
Should âvirtual listâ inside or outside of component âmessagesâ.