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,
targetUserIds,
targetChatId,
photo, // TODO Only used internally now, will be used for the UI in future
photo,
amount,
stars,
starGift,

View File

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

View File

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

View File

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