Service Message Reactions: Refactoring (#5399)

This commit is contained in:
Alexander Zinchuk 2025-01-21 18:19:42 +01:00
parent 958490efdb
commit a473c468c7
4 changed files with 5 additions and 6 deletions

View File

@ -769,7 +769,7 @@ function buildAction(
type, type,
targetUserIds, targetUserIds,
targetChatId, targetChatId,
photo, // TODO Only used internally now, will be used for the UI in future photo,
amount, amount,
stars, stars,
starGift, starGift,

View File

@ -25,7 +25,6 @@ const ActionMessageUpdatedAvatar: FC<OwnProps> = ({
} = getActions(); } = getActions();
const lang = useOldLang(); const lang = useOldLang();
const isVideo = message.content.action!.photo?.isVideo;
const handleViewUpdatedAvatar = () => { const handleViewUpdatedAvatar = () => {
openMediaViewer({ openMediaViewer({
@ -49,7 +48,7 @@ const ActionMessageUpdatedAvatar: FC<OwnProps> = ({
<Avatar <Avatar
photo={message.content.action!.photo} photo={message.content.action!.photo}
loopIndefinitely loopIndefinitely
withVideo={isVideo} withVideo
size="jumbo" size="jumbo"
/> />
</span> </span>

View File

@ -13,10 +13,10 @@
margin-top: 0.25rem; margin-top: 0.25rem;
} }
&.with-service-reactions { &.is-service {
justify-content: center; justify-content: center;
max-width: 19rem; max-width: 19rem;
margin: 0.3rem auto; margin: 0.3125rem auto;
} }
.own &.is-outside { .own &.is-outside {

View File

@ -182,7 +182,7 @@ const Reactions: FC<OwnProps> = ({
className={buildClassName( className={buildClassName(
'Reactions', 'Reactions',
isOutside && 'is-outside', isOutside && 'is-outside',
withServiceReactions && 'with-service-reactions', withServiceReactions && 'is-service',
)} )}
style={maxWidth ? `max-width: ${maxWidth}px` : undefined} style={maxWidth ? `max-width: ${maxWidth}px` : undefined}
dir={lang.isRtl ? 'rtl' : 'ltr'} dir={lang.isRtl ? 'rtl' : 'ltr'}