Profile Gifts: Fix loading more (#5673)
This commit is contained in:
parent
e8744fcec5
commit
6f74540e98
@ -4,6 +4,7 @@ import { getActions, withGlobal } from '../../../global';
|
||||
import type { ApiPeer, ApiSavedStarGift } from '../../../api/types';
|
||||
|
||||
import { selectPeer } from '../../../global/selectors';
|
||||
import buildClassName from '../../../util/buildClassName';
|
||||
import { CUSTOM_PEER_HIDDEN } from '../../../util/objects/customPeer';
|
||||
import { formatIntegerCompact } from '../../../util/textFormat';
|
||||
import { getGiftAttributes, getStickerFromGift, getTotalGiftAvailability } from '../helpers/gifts';
|
||||
@ -90,7 +91,11 @@ const SavedGift = ({
|
||||
const totalIssued = getTotalGiftAvailability(gift.gift);
|
||||
|
||||
return (
|
||||
<div ref={ref} className={styles.root} onClick={handleClick}>
|
||||
<div
|
||||
ref={ref}
|
||||
className={buildClassName(styles.root, 'scroll-item')}
|
||||
onClick={handleClick}
|
||||
>
|
||||
{radialPatternBackdrop}
|
||||
{!radialPatternBackdrop && <Avatar className={styles.avatar} peer={avatarPeer} size="micro" />}
|
||||
<AnimatedIconFromSticker
|
||||
|
||||
@ -836,6 +836,7 @@ const Profile: FC<OwnProps & StateProps> = ({
|
||||
function renderContentWithTransition() {
|
||||
return (
|
||||
<Transition
|
||||
className={`${resultType}-list`}
|
||||
activeKey={contentTransitionKey}
|
||||
name="fade"
|
||||
>
|
||||
@ -844,11 +845,16 @@ const Profile: FC<OwnProps & StateProps> = ({
|
||||
);
|
||||
}
|
||||
|
||||
const activeListSelector = `.shared-media-transition > .Transition_slide-active.${resultType}-list`;
|
||||
const itemSelector = !shouldUseTransitionForContent
|
||||
? `${activeListSelector} > .scroll-item`
|
||||
: `${activeListSelector} > .Transition_slide-active > .content > .scroll-item`;
|
||||
|
||||
return (
|
||||
<InfiniteScroll
|
||||
ref={containerRef}
|
||||
className="Profile custom-scroll"
|
||||
itemSelector={`.shared-media-transition > .Transition_slide-active.${resultType}-list > .scroll-item`}
|
||||
itemSelector={itemSelector}
|
||||
items={canRenderContent ? viewportIds : undefined}
|
||||
cacheBuster={cacheBuster}
|
||||
sensitiveArea={PROFILE_SENSITIVE_AREA}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user