Support narrow avatar in popular apps search result (#5310)

This commit is contained in:
Alexander Zinchuk 2024-12-20 11:37:07 +01:00
parent 77a103223b
commit b03ad51ec4
3 changed files with 6 additions and 4 deletions

View File

@ -114,6 +114,7 @@ const BotAppResults: FC<OwnProps & StateProps> = ({
<LeftSearchResultChat
chatId={id}
onClick={handleChatClick}
withOpenAppButton
/>
);
})}
@ -127,6 +128,7 @@ const BotAppResults: FC<OwnProps & StateProps> = ({
<LeftSearchResultChat
chatId={id}
onClick={handleChatClick}
withOpenAppButton
/>
);
})}

View File

@ -28,7 +28,7 @@ import MuteChatModal from '../MuteChatModal.async';
type OwnProps = {
chatId: string;
withUsername?: boolean;
isRecent?: boolean;
withOpenAppButton?: boolean;
onClick: (id: string) => void;
};
@ -48,7 +48,7 @@ const LeftSearchResultChat: FC<OwnProps & StateProps> = ({
isPinned,
isMuted,
canChangeFolder,
isRecent,
withOpenAppButton,
onClick,
}) => {
const { requestMainWebView } = getActions();
@ -121,7 +121,7 @@ const LeftSearchResultChat: FC<OwnProps & StateProps> = ({
storyViewerOrigin={StoryViewerOrigin.SearchResult}
/>
)}
{isRecent && user?.hasMainMiniApp && (
{withOpenAppButton && user?.hasMainMiniApp && (
<Button
className="ChatBadge miniapp"
pill

View File

@ -119,7 +119,7 @@ const RecentContacts: FC<OwnProps & StateProps> = ({
{recentlyFoundChatIds.map((id) => (
<LeftSearchResultChat
chatId={id}
isRecent
withOpenAppButton
onClick={handleClick}
/>
))}