Do not recreate onViewableItemsChange when the deeplink changes (#5489) (#5493)

(cherry picked from commit a6dc8fedbe)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
This commit is contained in:
Mattermost Build 2021-06-25 21:02:48 +02:00 committed by GitHub
parent ddf0c5b740
commit 0dd11d45e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -146,7 +146,7 @@ const PostList = ({
if (onViewableItemsChangedListener.current && !deepLinkURL) {
onViewableItemsChangedListener.current(viewableItems);
}
}, [deepLinkURL]);
}, []);
const renderItem = useCallback(({item, index}) => {
if (isStartOfNewMessages(item)) {