MoreFollows: Only show when all follows have been loaded

This commit is contained in:
Alex Gleason 2020-06-07 15:09:25 -05:00
parent 409431d7e8
commit 886b241433
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -207,9 +207,10 @@ export default class ScrollableList extends PureComponent {
}
getMoreFollows = () => {
const { scrollKey, isLoading, diffCount } = this.props;
const { scrollKey, isLoading, diffCount, hasMore } = this.props;
const isMoreFollows = ['followers', 'following'].some(k => k === scrollKey);
if (!(diffCount && isMoreFollows)) return null;
if (hasMore) return null;
return (
<MoreFollows visible={!isLoading} count={diffCount} type={scrollKey} />