Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix claim ID being null when reporting a claim that was not previously download. #1530

Merged
merged 3 commits into from
Jun 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
* Fix notification modals when reward is claimed ([#1436])(https://github.com/lbryio/lbry-app/issues/1436) and ([#1407])(https://github.com/lbryio/lbry-app/issues/1407)
* Fix disabled cards(grayed out) ([#1466])(https://github.com/lbryio/lbry-app/issues/1466)
* Fix markdown render ([#1179](https://github.com/lbryio/lbry-app/issues/1179))
* Fix claim ID being null when reporting a claim that was not previously download ([issue#1512](https://github.com/lbryio/lbry-app/issues/1512)) ([PR#1530](https://github.com/lbryio/lbry-app/pull/1530))


## [0.21.3] - 2018-04-23
Expand Down
5 changes: 2 additions & 3 deletions src/renderer/component/fileActions/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type FileInfo = {

type Props = {
uri: string,
claimId: string,
openModal: ({ id: string }, { uri: string }) => void,
claimIsMine: boolean,
fileInfo: FileInfo,
Expand All @@ -19,9 +20,7 @@ type Props = {

class FileActions extends React.PureComponent<Props> {
render() {
const { fileInfo, uri, openModal, claimIsMine, vertical } = this.props;

const claimId = fileInfo ? fileInfo.claim_id : '';
const { fileInfo, uri, openModal, claimIsMine, vertical, claimId } = this.props;
const showDelete = fileInfo && Object.keys(fileInfo).length > 0;

return (
Expand Down
6 changes: 4 additions & 2 deletions src/renderer/page/file/view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ class FilePage extends React.Component<Props> {
<h1 className="card__title card__title--file">{title}</h1>
<div className="card__title-identity-icons">
<FilePrice uri={normalizeURI(uri)} />
{isRewardContent && <Icon iconColor="red" tooltip="bottom" icon={icons.FEATURED} />}
{isRewardContent && (
<Icon iconColor="red" tooltip="bottom" icon={icons.FEATURED} />
)}
</div>
</div>
<span className="card__subtitle card__subtitle--file">
Expand Down Expand Up @@ -216,7 +218,7 @@ class FilePage extends React.Component<Props> {

<div className="card__content">
<FileDownloadLink uri={uri} />
<FileActions uri={uri} />
<FileActions uri={uri} claimId={claim.claim_id} />
</div>

<div className="card__content--extra-padding">
Expand Down