mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-03 02:35:12 +00:00
checks for downloaded paid content before disabling
This commit is contained in:
parent
4e2005b560
commit
5a2cd9dd76
2 changed files with 35 additions and 35 deletions
|
@ -154,7 +154,7 @@ class FileViewer extends React.PureComponent<Props> {
|
||||||
playContent() {
|
playContent() {
|
||||||
const { play, uri, fileInfo, isDownloading, isLoading, insufficientCredits } = this.props;
|
const { play, uri, fileInfo, isDownloading, isLoading, insufficientCredits } = this.props;
|
||||||
|
|
||||||
if (insufficientCredits) {
|
if (!fileInfo && insufficientCredits) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ class FileViewer extends React.PureComponent<Props> {
|
||||||
|
|
||||||
const layoverClass = classnames('content__cover', {
|
const layoverClass = classnames('content__cover', {
|
||||||
'card__media--nsfw': shouldObscureNsfw,
|
'card__media--nsfw': shouldObscureNsfw,
|
||||||
'card__media--disabled': insufficientCredits,
|
'card__media--disabled': !fileInfo && insufficientCredits,
|
||||||
});
|
});
|
||||||
|
|
||||||
const layoverStyle =
|
const layoverStyle =
|
||||||
|
|
|
@ -180,7 +180,7 @@ class FilePage extends React.Component<Props> {
|
||||||
<Page notContained className="main--file-page">
|
<Page notContained className="main--file-page">
|
||||||
<div className="grid-area--content">
|
<div className="grid-area--content">
|
||||||
<h1 className="media__uri">{uri}</h1>
|
<h1 className="media__uri">{uri}</h1>
|
||||||
{insufficientCredits && (
|
{!fileInfo && insufficientCredits && (
|
||||||
<div className="media__insufficient-credits help--warning">
|
<div className="media__insufficient-credits help--warning">
|
||||||
{__(
|
{__(
|
||||||
'The publisher has chosen to charge LBC to view this content. Your balance is currently to low to view it.'
|
'The publisher has chosen to charge LBC to view this content. Your balance is currently to low to view it.'
|
||||||
|
|
Loading…
Add table
Reference in a new issue