Gifts: Small fixes (#5139)
This commit is contained in:
parent
01dc204fa7
commit
3fae1b4242
@ -743,7 +743,7 @@ export default memo(withGlobal<OwnProps>(
|
||||
const userFullInfo = isPrivate ? selectUserFullInfo(global, chatId) : undefined;
|
||||
const chatFullInfo = !isPrivate ? selectChatFullInfo(global, chatId) : undefined;
|
||||
const fullInfo = userFullInfo || chatFullInfo;
|
||||
const canGift = !selectIsPremiumPurchaseBlocked(global) && !isChatWithSelf;
|
||||
const canGift = !selectIsPremiumPurchaseBlocked(global) && !isChatWithSelf && isPrivate;
|
||||
|
||||
const topic = selectTopic(global, chatId, threadId);
|
||||
const canCreateTopic = chat.isForum && (
|
||||
|
||||
@ -26,6 +26,8 @@
|
||||
background-color: var(--color-borders);
|
||||
gap: 1px;
|
||||
|
||||
flex-shrink: 0;
|
||||
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
@ -67,9 +67,6 @@ function GiftItemPremium({
|
||||
role="button"
|
||||
onClick={handleGiftClick}
|
||||
>
|
||||
{Boolean(discount) && (
|
||||
<GiftRibbon color="red" text={lang('GiftDiscount', { percent: discount })} />
|
||||
)}
|
||||
<AnimatedIconFromSticker
|
||||
sticker={sticker}
|
||||
play={canPlayAnimatedEmojis}
|
||||
@ -85,6 +82,9 @@ function GiftItemPremium({
|
||||
<Button className={styles.buy} nonInteractive size="tiny" pill fluid>
|
||||
{formatCurrencyAsString(amount, currency)}
|
||||
</Button>
|
||||
{Boolean(discount) && (
|
||||
<GiftRibbon color="red" text={lang('GiftDiscount', { percent: discount })} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@ -57,8 +57,6 @@ function GiftItemStar({ sticker, gift, onClick }: OwnProps & StateProps) {
|
||||
role="button"
|
||||
onClick={handleGiftClick}
|
||||
>
|
||||
{isLimited && !isSoldOut && <GiftRibbon color="blue" text={lang('GiftLimited')} />}
|
||||
{isSoldOut && <GiftRibbon color="red" text={lang('GiftSoldOut')} />}
|
||||
<AnimatedIconFromSticker
|
||||
sticker={sticker}
|
||||
noLoop
|
||||
@ -71,6 +69,8 @@ function GiftItemStar({ sticker, gift, onClick }: OwnProps & StateProps) {
|
||||
{stars}
|
||||
</div>
|
||||
</Button>
|
||||
{isLimited && !isSoldOut && <GiftRibbon color="blue" text={lang('GiftLimited')} />}
|
||||
{isSoldOut && <GiftRibbon color="red" text={lang('GiftSoldOut')} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user