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

View File

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

View File

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