diff --git a/src/api/gramjs/methods/chats.ts b/src/api/gramjs/methods/chats.ts index cb9bc3d48..54c8925d9 100644 --- a/src/api/gramjs/methods/chats.ts +++ b/src/api/gramjs/methods/chats.ts @@ -141,7 +141,6 @@ export async function fetchChats({ const chats: ApiChat[] = []; const draftsById: Record = {}; - const replyingToById: Record = {}; const dialogs = (resultPinned ? resultPinned.dialogs : []).concat(result.dialogs); @@ -209,7 +208,6 @@ export async function fetchChats({ users, userStatusesById, draftsById, - replyingToById, orderedPinnedIds: withPinned ? orderedPinnedIds : undefined, totalChatCount, }; diff --git a/src/components/payment/PaymentModal.tsx b/src/components/payment/PaymentModal.tsx index 68edfbad1..b91d27ed9 100644 --- a/src/components/payment/PaymentModal.tsx +++ b/src/components/payment/PaymentModal.tsx @@ -301,7 +301,7 @@ const PaymentModal: FC = ({ totalPrice={totalPrice} invoice={invoice} checkoutInfo={checkoutInfo} - isPaymentFormUrl + isPaymentFormUrl={isPaymentFormUrl} currency={currency!} hasShippingOptions={hasShippingOptions} tipAmount={paymentState.tipAmount} @@ -596,7 +596,8 @@ const PaymentModal: FC = ({
{renderModalContent(step)} diff --git a/src/components/story/hooks/useStoryPreloader.ts b/src/components/story/hooks/useStoryPreloader.ts index be01a1d9c..b2d3d9a57 100644 --- a/src/components/story/hooks/useStoryPreloader.ts +++ b/src/components/story/hooks/useStoryPreloader.ts @@ -130,6 +130,7 @@ function preloadProgressive(url: string) { }, PROGRESSIVE_PRELOAD_DURATION); } +// eslint-disable-next-line no-async-without-await/no-async-without-await async function preloadStream(hash: string) { const loader = makeProgressiveLoader(getProgressiveUrl(hash)); let cachedSize = 0; diff --git a/src/components/ui/Transition.tsx b/src/components/ui/Transition.tsx index 0dc5df3af..3af7da941 100644 --- a/src/components/ui/Transition.tsx +++ b/src/components/ui/Transition.tsx @@ -10,6 +10,7 @@ import { selectCanAnimateInterface } from '../../global/selectors'; import buildClassName from '../../util/buildClassName'; import { waitForAnimationEnd, waitForTransitionEnd } from '../../util/cssAnimationEndListeners'; import forceReflow from '../../util/forceReflow'; +import { omit } from '../../util/iteratees'; import { allowSwipeControlForTransition } from '../../util/swipeController'; import useForceUpdate from '../../hooks/useForceUpdate'; @@ -34,7 +35,7 @@ export type TransitionProps = { shouldRestoreHeight?: boolean; shouldCleanup?: boolean; cleanupExceptionKey?: number; - cleanupKey?: number; + cleanupOnlyKey?: number; // Used by async components which are usually remounted during first animation shouldWrap?: boolean; wrapExceptionKey?: number; @@ -74,7 +75,7 @@ function Transition({ shouldRestoreHeight, shouldCleanup, cleanupExceptionKey, - cleanupKey, + cleanupOnlyKey, shouldWrap, wrapExceptionKey, id, @@ -122,13 +123,12 @@ function Transition({ useLayoutEffect(() => { function cleanup() { if (!shouldCleanup) { - if (cleanupKey !== undefined) { - delete rendersRef.current[cleanupKey]; - } return; } if (cleanupExceptionKey !== undefined) { rendersRef.current = { [cleanupExceptionKey]: rendersRef.current[cleanupExceptionKey] }; + } else if (cleanupOnlyKey !== undefined) { + rendersRef.current = omit(rendersRef.current, [cleanupOnlyKey]); } else { rendersRef.current = {}; } @@ -317,7 +317,7 @@ function Transition({ shouldDisableAnimation, forceUpdate, withSwipeControl, - cleanupKey, + cleanupOnlyKey, ]); useEffect(() => {