Inline Bot Tooltip: Fix missing results for files (#1634)
This commit is contained in:
parent
85306fe67e
commit
34933fd064
@ -4,7 +4,7 @@ import {
|
|||||||
|
|
||||||
export type ApiInlineResultType = (
|
export type ApiInlineResultType = (
|
||||||
'article' | 'audio' | 'contact' | 'document' | 'game' | 'gif' | 'location' | 'mpeg4_gif' |
|
'article' | 'audio' | 'contact' | 'document' | 'game' | 'gif' | 'location' | 'mpeg4_gif' |
|
||||||
'photo' | 'sticker' | 'venue' | 'video' | 'voice'
|
'photo' | 'sticker' | 'venue' | 'video' | 'voice' | 'file'
|
||||||
);
|
);
|
||||||
|
|
||||||
export interface ApiWebDocument {
|
export interface ApiWebDocument {
|
||||||
|
|||||||
@ -100,7 +100,7 @@ const InlineBotTooltip: FC<OwnProps> = ({
|
|||||||
? prevInlineBotResults
|
? prevInlineBotResults
|
||||||
: inlineBotResults;
|
: inlineBotResults;
|
||||||
|
|
||||||
if (!shouldRender || !renderedInlineBotResults || (!renderedInlineBotResults.length && !switchPm)) {
|
if (!shouldRender || !(renderedInlineBotResults?.length || switchPm)) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,6 +153,7 @@ const InlineBotTooltip: FC<OwnProps> = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
case 'video':
|
case 'video':
|
||||||
|
case 'file':
|
||||||
case 'game':
|
case 'game':
|
||||||
return (
|
return (
|
||||||
<MediaResult
|
<MediaResult
|
||||||
@ -190,7 +191,7 @@ const InlineBotTooltip: FC<OwnProps> = ({
|
|||||||
sensitiveArea={160}
|
sensitiveArea={160}
|
||||||
>
|
>
|
||||||
{switchPm && renderSwitchPm()}
|
{switchPm && renderSwitchPm()}
|
||||||
{renderContent()}
|
{renderedInlineBotResults?.length && renderContent()}
|
||||||
</InfiniteScroll>
|
</InfiniteScroll>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user