Service Message Reactions: Refactoring (#5399)
This commit is contained in:
parent
958490efdb
commit
a473c468c7
@ -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,
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
@ -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 {
|
||||||
|
|||||||
@ -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'}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user