Expand override for mobile livestream layout

This commit is contained in:
Rafael 2022-02-09 12:56:24 -03:00 committed by Thomas Zarebczan
parent 2a7b9364e4
commit 63cc5da092

View file

@ -13,6 +13,7 @@ import I18nMessage from 'component/i18nMessage';
import Button from 'component/button'; import Button from 'component/button';
import FileDescription from 'component/fileDescription'; import FileDescription from 'component/fileDescription';
import { ENABLE_MATURE } from 'config'; import { ENABLE_MATURE } from 'config';
import { useIsMobile } from 'effects/use-screensize';
type Props = { type Props = {
uri: string, uri: string,
@ -40,6 +41,8 @@ export default function FileTitleSection(props: Props) {
doFetchSubCount, doFetchSubCount,
} = props; } = props;
const isMobile = useIsMobile();
React.useEffect(() => { React.useEffect(() => {
if (channelClaimId) doFetchSubCount(channelClaimId); if (channelClaimId) doFetchSubCount(channelClaimId);
}, [channelClaimId, doFetchSubCount]); }, [channelClaimId, doFetchSubCount]);
@ -100,7 +103,7 @@ export default function FileTitleSection(props: Props) {
) : ( ) : (
<> <>
<ClaimAuthor channelSubCount={subCount} uri={uri} /> <ClaimAuthor channelSubCount={subCount} uri={uri} />
<FileDescription uri={uri} /> <FileDescription expandOverride={isMobile && livestream} uri={uri} />
</> </>
) )
} }