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 chats: ApiChat[] = [];
|
||||||
const draftsById: Record<string, ApiDraft> = {};
|
const draftsById: Record<string, ApiDraft> = {};
|
||||||
const replyingToById: Record<string, number> = {};
|
|
||||||
|
|
||||||
const dialogs = (resultPinned ? resultPinned.dialogs : []).concat(result.dialogs);
|
const dialogs = (resultPinned ? resultPinned.dialogs : []).concat(result.dialogs);
|
||||||
|
|
||||||
@ -209,7 +208,6 @@ export async function fetchChats({
|
|||||||
users,
|
users,
|
||||||
userStatusesById,
|
userStatusesById,
|
||||||
draftsById,
|
draftsById,
|
||||||
replyingToById,
|
|
||||||
orderedPinnedIds: withPinned ? orderedPinnedIds : undefined,
|
orderedPinnedIds: withPinned ? orderedPinnedIds : undefined,
|
||||||
totalChatCount,
|
totalChatCount,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -301,7 +301,7 @@ const PaymentModal: FC<OwnProps & StateProps & GlobalStateProps> = ({
|
|||||||
totalPrice={totalPrice}
|
totalPrice={totalPrice}
|
||||||
invoice={invoice}
|
invoice={invoice}
|
||||||
checkoutInfo={checkoutInfo}
|
checkoutInfo={checkoutInfo}
|
||||||
isPaymentFormUrl
|
isPaymentFormUrl={isPaymentFormUrl}
|
||||||
currency={currency!}
|
currency={currency!}
|
||||||
hasShippingOptions={hasShippingOptions}
|
hasShippingOptions={hasShippingOptions}
|
||||||
tipAmount={paymentState.tipAmount}
|
tipAmount={paymentState.tipAmount}
|
||||||
@ -596,7 +596,8 @@ const PaymentModal: FC<OwnProps & StateProps & GlobalStateProps> = ({
|
|||||||
<Transition
|
<Transition
|
||||||
name="slide"
|
name="slide"
|
||||||
activeKey={step}
|
activeKey={step}
|
||||||
cleanupKey={PaymentStep.ConfirmPayment}
|
shouldCleanup
|
||||||
|
cleanupOnlyKey={PaymentStep.ConfirmPayment}
|
||||||
>
|
>
|
||||||
<div className="content custom-scroll">
|
<div className="content custom-scroll">
|
||||||
{renderModalContent(step)}
|
{renderModalContent(step)}
|
||||||
|
|||||||
@ -130,6 +130,7 @@ function preloadProgressive(url: string) {
|
|||||||
}, PROGRESSIVE_PRELOAD_DURATION);
|
}, PROGRESSIVE_PRELOAD_DURATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-async-without-await/no-async-without-await
|
||||||
async function preloadStream(hash: string) {
|
async function preloadStream(hash: string) {
|
||||||
const loader = makeProgressiveLoader(getProgressiveUrl(hash));
|
const loader = makeProgressiveLoader(getProgressiveUrl(hash));
|
||||||
let cachedSize = 0;
|
let cachedSize = 0;
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import { selectCanAnimateInterface } from '../../global/selectors';
|
|||||||
import buildClassName from '../../util/buildClassName';
|
import buildClassName from '../../util/buildClassName';
|
||||||
import { waitForAnimationEnd, waitForTransitionEnd } from '../../util/cssAnimationEndListeners';
|
import { waitForAnimationEnd, waitForTransitionEnd } from '../../util/cssAnimationEndListeners';
|
||||||
import forceReflow from '../../util/forceReflow';
|
import forceReflow from '../../util/forceReflow';
|
||||||
|
import { omit } from '../../util/iteratees';
|
||||||
import { allowSwipeControlForTransition } from '../../util/swipeController';
|
import { allowSwipeControlForTransition } from '../../util/swipeController';
|
||||||
|
|
||||||
import useForceUpdate from '../../hooks/useForceUpdate';
|
import useForceUpdate from '../../hooks/useForceUpdate';
|
||||||
@ -34,7 +35,7 @@ export type TransitionProps = {
|
|||||||
shouldRestoreHeight?: boolean;
|
shouldRestoreHeight?: boolean;
|
||||||
shouldCleanup?: boolean;
|
shouldCleanup?: boolean;
|
||||||
cleanupExceptionKey?: number;
|
cleanupExceptionKey?: number;
|
||||||
cleanupKey?: number;
|
cleanupOnlyKey?: number;
|
||||||
// Used by async components which are usually remounted during first animation
|
// Used by async components which are usually remounted during first animation
|
||||||
shouldWrap?: boolean;
|
shouldWrap?: boolean;
|
||||||
wrapExceptionKey?: number;
|
wrapExceptionKey?: number;
|
||||||
@ -74,7 +75,7 @@ function Transition({
|
|||||||
shouldRestoreHeight,
|
shouldRestoreHeight,
|
||||||
shouldCleanup,
|
shouldCleanup,
|
||||||
cleanupExceptionKey,
|
cleanupExceptionKey,
|
||||||
cleanupKey,
|
cleanupOnlyKey,
|
||||||
shouldWrap,
|
shouldWrap,
|
||||||
wrapExceptionKey,
|
wrapExceptionKey,
|
||||||
id,
|
id,
|
||||||
@ -122,13 +123,12 @@ function Transition({
|
|||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
if (!shouldCleanup) {
|
if (!shouldCleanup) {
|
||||||
if (cleanupKey !== undefined) {
|
|
||||||
delete rendersRef.current[cleanupKey];
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (cleanupExceptionKey !== undefined) {
|
if (cleanupExceptionKey !== undefined) {
|
||||||
rendersRef.current = { [cleanupExceptionKey]: rendersRef.current[cleanupExceptionKey] };
|
rendersRef.current = { [cleanupExceptionKey]: rendersRef.current[cleanupExceptionKey] };
|
||||||
|
} else if (cleanupOnlyKey !== undefined) {
|
||||||
|
rendersRef.current = omit(rendersRef.current, [cleanupOnlyKey]);
|
||||||
} else {
|
} else {
|
||||||
rendersRef.current = {};
|
rendersRef.current = {};
|
||||||
}
|
}
|
||||||
@ -317,7 +317,7 @@ function Transition({
|
|||||||
shouldDisableAnimation,
|
shouldDisableAnimation,
|
||||||
forceUpdate,
|
forceUpdate,
|
||||||
withSwipeControl,
|
withSwipeControl,
|
||||||
cleanupKey,
|
cleanupOnlyKey,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user