display duration, fees and obscure nsfw for resolved search results
This commit is contained in:
parent
20a984f259
commit
3b0ea191fe
4 changed files with 9 additions and 8 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -7047,8 +7047,8 @@
|
|||
}
|
||||
},
|
||||
"lbry-redux": {
|
||||
"version": "github:lbryio/lbry-redux#6ef2f9dde9167f3217fde2d7d3fed97282bdb0dc",
|
||||
"from": "github:lbryio/lbry-redux#6ef2f9dde9167f3217fde2d7d3fed97282bdb0dc",
|
||||
"version": "github:lbryio/lbry-redux#e8f29f1c47b136669df265babb109d2488a37db0",
|
||||
"from": "github:lbryio/lbry-redux#e8f29f1c47b136669df265babb109d2488a37db0",
|
||||
"requires": {
|
||||
"proxy-polyfill": "0.1.6",
|
||||
"reselect": "^3.0.0",
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"base-64": "^0.1.0",
|
||||
"@expo/vector-icons": "^8.1.0",
|
||||
"gfycat-style-urls": "^1.0.3",
|
||||
"lbry-redux": "lbryio/lbry-redux#6ef2f9dde9167f3217fde2d7d3fed97282bdb0dc",
|
||||
"lbry-redux": "lbryio/lbry-redux#e8f29f1c47b136669df265babb109d2488a37db0",
|
||||
"lbryinc": "lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c",
|
||||
"lodash": ">=4.17.11",
|
||||
"merge": ">=1.2.1",
|
||||
|
|
|
@ -99,7 +99,7 @@ class FilePrice extends React.PureComponent {
|
|||
|
||||
const isEstimate = costInfo ? !costInfo.includesData : null;
|
||||
const amount = cost ? parseFloat(cost) : costInfo ? parseFloat(costInfo.cost) : 0;
|
||||
if (!costInfo || isNaN(amount) || amount === 0) {
|
||||
if (isNaN(amount) || amount === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,20 +44,21 @@ class FileResultItem extends React.PureComponent {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { featuredResult, fileInfo, navigation, result, rewardedContentClaimIds, style } = this.props;
|
||||
const { featuredResult, fileInfo, navigation, obscureNsfw, result, rewardedContentClaimIds, style } = this.props;
|
||||
const {
|
||||
channel,
|
||||
channel_claim_id: channelClaimId,
|
||||
claimId,
|
||||
duration,
|
||||
fee,
|
||||
name,
|
||||
nsfw,
|
||||
release_time: releaseTime,
|
||||
thumbnail_url: thumbnailUrl,
|
||||
title,
|
||||
} = result;
|
||||
|
||||
const obscure = false; // obscureNsfw && nsfw;
|
||||
const duration = 0;
|
||||
const obscure = obscureNsfw && nsfw;
|
||||
const url = normalizeURI(`${name}#${claimId}`);
|
||||
const hasChannel = !!channel;
|
||||
const channelUrl = channel ? normalizeURI(`${channel}#${channelClaimId}`) : null;
|
||||
|
@ -83,7 +84,7 @@ class FileResultItem extends React.PureComponent {
|
|||
/>
|
||||
)}
|
||||
<FilePrice
|
||||
cost={fee}
|
||||
cost={fee ? parseFloat(fee) / 100000000 : 0}
|
||||
uri={url}
|
||||
style={fileListStyle.filePriceContainer}
|
||||
iconStyle={fileListStyle.filePriceIcon}
|
||||
|
|
Loading…
Reference in a new issue