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 = (
|
||||
'article' | 'audio' | 'contact' | 'document' | 'game' | 'gif' | 'location' | 'mpeg4_gif' |
|
||||
'photo' | 'sticker' | 'venue' | 'video' | 'voice'
|
||||
'photo' | 'sticker' | 'venue' | 'video' | 'voice' | 'file'
|
||||
);
|
||||
|
||||
export interface ApiWebDocument {
|
||||
|
||||
@ -100,7 +100,7 @@ const InlineBotTooltip: FC<OwnProps> = ({
|
||||
? prevInlineBotResults
|
||||
: inlineBotResults;
|
||||
|
||||
if (!shouldRender || !renderedInlineBotResults || (!renderedInlineBotResults.length && !switchPm)) {
|
||||
if (!shouldRender || !(renderedInlineBotResults?.length || switchPm)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@ -153,6 +153,7 @@ const InlineBotTooltip: FC<OwnProps> = ({
|
||||
);
|
||||
|
||||
case 'video':
|
||||
case 'file':
|
||||
case 'game':
|
||||
return (
|
||||
<MediaResult
|
||||
@ -190,7 +191,7 @@ const InlineBotTooltip: FC<OwnProps> = ({
|
||||
sensitiveArea={160}
|
||||
>
|
||||
{switchPm && renderSwitchPm()}
|
||||
{renderContent()}
|
||||
{renderedInlineBotResults?.length && renderContent()}
|
||||
</InfiniteScroll>
|
||||
);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user