block spee.ch thumbnails
This commit is contained in:
parent
c29be5b7ec
commit
6d46686e7e
2 changed files with 18 additions and 0 deletions
|
@ -132,6 +132,16 @@ export default function ClaimList(props: Props) {
|
|||
type={type}
|
||||
properties={type !== 'small' ? undefined : false}
|
||||
showUserBlocked={showHiddenByUser}
|
||||
customShouldHide={(claim: StreamClaim) => {
|
||||
// Hack to hide spee.ch thumbnail publishes
|
||||
// If it meets these requirements, it was probably uploaded here:
|
||||
// https://github.com/lbryio/lbry-redux/blob/master/src/redux/actions/publish.js#L74-L79
|
||||
if (claim.name.length === 24 && !claim.name.includes(' ') && claim.value.author === 'Spee.ch') {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</ul>
|
||||
|
|
|
@ -53,6 +53,7 @@ type Props = {
|
|||
hideBlock?: boolean,
|
||||
streamingUrl: ?string,
|
||||
getFile: string => void,
|
||||
customShouldHide?: Claim => boolean,
|
||||
};
|
||||
|
||||
const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
||||
|
@ -84,6 +85,7 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
|||
hideBlock,
|
||||
getFile,
|
||||
streamingUrl,
|
||||
customShouldHide,
|
||||
} = props;
|
||||
const shouldFetch =
|
||||
claim === undefined || (claim !== null && claim.value_type === 'channel' && isEmpty(claim.meta) && !pending);
|
||||
|
@ -141,6 +143,12 @@ const ClaimPreview = forwardRef<any, {}>((props: Props, ref: any) => {
|
|||
shouldHide = blockedChannelUris.some(blockedUri => blockedUri === claim.permanent_url);
|
||||
}
|
||||
|
||||
if (!shouldHide && customShouldHide && claim) {
|
||||
if (customShouldHide(claim)) {
|
||||
shouldHide = true;
|
||||
}
|
||||
}
|
||||
|
||||
function handleContextMenu(e) {
|
||||
// @if TARGET='app'
|
||||
e.preventDefault();
|
||||
|
|
Loading…
Add table
Reference in a new issue