Saved Messages: Small UI fixes (#5168)

This commit is contained in:
zubiden 2024-11-09 15:40:26 +04:00 committed by Alexander Zinchuk
parent de3f791b10
commit e6eb8bac00
2 changed files with 4 additions and 3 deletions

View File

@ -72,6 +72,7 @@ const FullNameTitle: FC<OwnProps> = ({
const isUser = realPeer && isPeerUser(realPeer); const isUser = realPeer && isPeerUser(realPeer);
const title = realPeer && (isUser ? getUserFullName(realPeer) : getChatTitle(lang, realPeer)); const title = realPeer && (isUser ? getUserFullName(realPeer) : getChatTitle(lang, realPeer));
const isPremium = isUser && realPeer.isPremium; const isPremium = isUser && realPeer.isPremium;
const canShowEmojiStatus = withEmojiStatus && !isSavedMessages && realPeer;
const handleTitleClick = useLastCallback((e) => { const handleTitleClick = useLastCallback((e) => {
if (!title || !canCopyTitle) { if (!title || !canCopyTitle) {
@ -126,7 +127,7 @@ const FullNameTitle: FC<OwnProps> = ({
<> <>
{!noVerified && peer?.isVerified && <VerifiedIcon />} {!noVerified && peer?.isVerified && <VerifiedIcon />}
{!noFake && peer?.fakeType && <FakeIcon fakeType={peer.fakeType} />} {!noFake && peer?.fakeType && <FakeIcon fakeType={peer.fakeType} />}
{withEmojiStatus && realPeer?.emojiStatus && ( {canShowEmojiStatus && realPeer.emojiStatus && (
<CustomEmoji <CustomEmoji
documentId={realPeer.emojiStatus.documentId} documentId={realPeer.emojiStatus.documentId}
size={emojiStatusSize} size={emojiStatusSize}
@ -135,7 +136,7 @@ const FullNameTitle: FC<OwnProps> = ({
onClick={onEmojiStatusClick} onClick={onEmojiStatusClick}
/> />
)} )}
{withEmojiStatus && !realPeer?.emojiStatus && isPremium && <StarIcon />} {canShowEmojiStatus && !realPeer.emojiStatus && isPremium && <StarIcon />}
</> </>
)} )}
{iconElement} {iconElement}

View File

@ -817,7 +817,7 @@ export default memo(withGlobal<OwnProps>(
const storyByIds = peerStories?.byId; const storyByIds = peerStories?.byId;
const archiveStoryIds = peerStories?.archiveIds; const archiveStoryIds = peerStories?.archiveIds;
const hasGiftsTab = Boolean(userFullInfo?.starGiftCount); const hasGiftsTab = Boolean(userFullInfo?.starGiftCount) && !isSavedDialog;
const userGifts = global.users.giftsById[chatId]; const userGifts = global.users.giftsById[chatId];
return { return {