PaymentModal: Fix displaying Payment type button (#4170)
This commit is contained in:
parent
34fdb278b4
commit
a5c38e59cc
@ -141,7 +141,6 @@ export async function fetchChats({
|
||||
|
||||
const chats: ApiChat[] = [];
|
||||
const draftsById: Record<string, ApiDraft> = {};
|
||||
const replyingToById: Record<string, number> = {};
|
||||
|
||||
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,
|
||||
};
|
||||
|
||||
@ -301,7 +301,7 @@ const PaymentModal: FC<OwnProps & StateProps & GlobalStateProps> = ({
|
||||
totalPrice={totalPrice}
|
||||
invoice={invoice}
|
||||
checkoutInfo={checkoutInfo}
|
||||
isPaymentFormUrl
|
||||
isPaymentFormUrl={isPaymentFormUrl}
|
||||
currency={currency!}
|
||||
hasShippingOptions={hasShippingOptions}
|
||||
tipAmount={paymentState.tipAmount}
|
||||
@ -596,7 +596,8 @@ const PaymentModal: FC<OwnProps & StateProps & GlobalStateProps> = ({
|
||||
<Transition
|
||||
name="slide"
|
||||
activeKey={step}
|
||||
cleanupKey={PaymentStep.ConfirmPayment}
|
||||
shouldCleanup
|
||||
cleanupOnlyKey={PaymentStep.ConfirmPayment}
|
||||
>
|
||||
<div className="content custom-scroll">
|
||||
{renderModalContent(step)}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user