diff --git a/src/components/common/reactions/ReactionAnimatedEmoji.tsx b/src/components/common/reactions/ReactionAnimatedEmoji.tsx index 844da0fee..755c51e75 100644 --- a/src/components/common/reactions/ReactionAnimatedEmoji.tsx +++ b/src/components/common/reactions/ReactionAnimatedEmoji.tsx @@ -36,7 +36,6 @@ type OwnProps = { shouldPause?: boolean; shouldLoop?: boolean; loopLimit?: number; - shouldDelayInit?: boolean; observeIntersection?: ObserveFn; }; @@ -67,7 +66,6 @@ const ReactionAnimatedEmoji = ({ shouldPause, shouldLoop, loopLimit, - shouldDelayInit, observeIntersection, }: OwnProps & StateProps) => { const { stopActiveReaction } = getActions(); @@ -169,7 +167,6 @@ const ReactionAnimatedEmoji = ({ size={size} noPlay={shouldPause} loopLimit={loopLimit} - forceAlways={!shouldDelayInit} observeIntersectionForPlaying={observeIntersection} /> )} @@ -181,7 +178,6 @@ const ReactionAnimatedEmoji = ({ tgsUrl={mediaDataCenterIcon} play={isIntersecting && !shouldPause} noLoop={!shouldLoop} - forceAlways={!shouldDelayInit} onLoad={markAnimationLoaded} onEnded={unmarkAnimationLoaded} /> @@ -195,7 +191,6 @@ const ReactionAnimatedEmoji = ({ tgsUrl={mediaDataEffect} play={isIntersecting} noLoop - forceAlways={!shouldDelayInit} onEnded={handleEnded} /> {isCustom && !assignedEffectId && isIntersecting && ( diff --git a/src/components/middle/message/Message.tsx b/src/components/middle/message/Message.tsx index 24e6a74d6..d2cf631b3 100644 --- a/src/components/middle/message/Message.tsx +++ b/src/components/middle/message/Message.tsx @@ -1045,7 +1045,6 @@ const Message: FC = ({ noRecentReactors={isChannel} tags={tags} isCurrentUserPremium={isPremium} - getIsMessageListReady={getIsMessageListReady} /> ); } @@ -1650,7 +1649,6 @@ const Message: FC = ({ observeIntersection={observeIntersectionForPlaying} noRecentReactors={isChannel} tags={tags} - getIsMessageListReady={getIsMessageListReady} /> )} diff --git a/src/components/middle/message/reactions/ReactionButton.tsx b/src/components/middle/message/reactions/ReactionButton.tsx index 638806b8d..071a22ace 100644 --- a/src/components/middle/message/reactions/ReactionButton.tsx +++ b/src/components/middle/message/reactions/ReactionButton.tsx @@ -28,7 +28,6 @@ type OwnProps = { recentReactors?: ApiPeer[]; className?: string; chosenClassName?: string; - shouldDelayInit?: boolean; observeIntersection?: ObserveFn; onClick?: (reaction: ApiReaction) => void; }; @@ -40,7 +39,6 @@ const ReactionButton = ({ recentReactors, className, chosenClassName, - shouldDelayInit, observeIntersection, onClick, }: OwnProps) => { @@ -66,7 +64,6 @@ const ReactionButton = ({ reaction={reaction.reaction} size={REACTION_SIZE} observeIntersection={observeIntersection} - shouldDelayInit={shouldDelayInit} /> {recentReactors?.length ? ( diff --git a/src/components/middle/message/reactions/Reactions.tsx b/src/components/middle/message/reactions/Reactions.tsx index dba295b3d..31010300c 100644 --- a/src/components/middle/message/reactions/Reactions.tsx +++ b/src/components/middle/message/reactions/Reactions.tsx @@ -11,14 +11,12 @@ import type { } from '../../../../api/types'; import type { ObserveFn } from '../../../../hooks/useIntersectionObserver'; import type { ThreadId } from '../../../../types'; -import type { Signal } from '../../../../util/signals'; import { getReactionKey, isReactionChosen } from '../../../../global/helpers'; import { selectPeer } from '../../../../global/selectors'; import buildClassName from '../../../../util/buildClassName'; import { getMessageKey } from '../../../../util/keys/messageKey'; -import useDerivedState from '../../../../hooks/useDerivedState'; import useLastCallback from '../../../../hooks/useLastCallback'; import useOldLang from '../../../../hooks/useOldLang'; @@ -37,7 +35,6 @@ type OwnProps = { isCurrentUserPremium?: boolean; observeIntersection?: ObserveFn; noRecentReactors?: boolean; - getIsMessageListReady: Signal; }; const MAX_RECENT_AVATARS = 3; @@ -52,7 +49,6 @@ const Reactions: FC = ({ noRecentReactors, isCurrentUserPremium, tags, - getIsMessageListReady, }) => { const { toggleReaction, @@ -68,8 +64,6 @@ const Reactions: FC = ({ results.reduce((acc, reaction) => acc + reaction.count, 0) ), [results]); - const isMessageListReady = useDerivedState(getIsMessageListReady); - const recentReactorsByReactionKey = useMemo(() => { const global = getGlobal(); @@ -158,7 +152,6 @@ const Reactions: FC = ({ onClick={handleClick} onRemove={handleRemoveReaction} observeIntersection={observeIntersection} - shouldDelayInit={!isMessageListReady} /> ) : ( = ({ reaction={reaction} onClick={handleClick} observeIntersection={observeIntersection} - shouldDelayInit={!isMessageListReady} /> ) ))} diff --git a/src/components/middle/message/reactions/SavedTagButton.tsx b/src/components/middle/message/reactions/SavedTagButton.tsx index 1e605d7a7..33bee9ada 100644 --- a/src/components/middle/message/reactions/SavedTagButton.tsx +++ b/src/components/middle/message/reactions/SavedTagButton.tsx @@ -38,7 +38,6 @@ type OwnProps = { chosenClassName?: string; isDisabled?: boolean; withContextMenu?: boolean; - shouldDelayInit?: boolean; observeIntersection?: ObserveFn; onClick?: (reaction: ApiReaction) => void; onRemove?: (reaction: ApiReaction) => void; @@ -55,7 +54,6 @@ const SavedTagButton = ({ withCount, isDisabled, withContextMenu, - shouldDelayInit, observeIntersection, onClick, onRemove, @@ -141,7 +139,6 @@ const SavedTagButton = ({ loopLimit={LOOP_LIMIT} size={REACTION_SIZE} observeIntersection={observeIntersection} - shouldDelayInit={shouldDelayInit} /> {hasText && (