Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d63253cc30 | ||
|
|
6ce143b145 | ||
|
|
c7ce7ea284 | ||
|
|
076122def4 |
No files matched your search
@@ -25,6 +25,7 @@ import {
|
||||
selectPurchaseUriErrorMessage,
|
||||
} from 'lbry-redux';
|
||||
import {
|
||||
doClaimEligiblePurchaseRewards,
|
||||
doFetchCostInfoForUri,
|
||||
makeSelectCostInfoForUri,
|
||||
selectRewardContentClaimIds,
|
||||
@@ -69,6 +70,7 @@ const select = (state, props) => {
|
||||
};
|
||||
|
||||
const perform = dispatch => ({
|
||||
claimEligibleRewards: () => dispatch(doClaimEligiblePurchaseRewards()),
|
||||
deleteFile: (fileInfo, deleteFromDevice, abandonClaim) => {
|
||||
dispatch(doDeleteFile(fileInfo, deleteFromDevice, abandonClaim));
|
||||
},
|
||||
|
||||
@@ -477,6 +477,7 @@ class FilePage extends React.PureComponent {
|
||||
return;
|
||||
}
|
||||
|
||||
const { claimEligibleRewards } = this.props;
|
||||
const { nout, claim_id: claimId, txid } = claim;
|
||||
const outpoint = `${txid}:${nout}`;
|
||||
const params = {
|
||||
@@ -488,7 +489,9 @@ class FilePage extends React.PureComponent {
|
||||
params.time_to_start = timeToStart;
|
||||
}
|
||||
|
||||
Lbryio.call('file', 'view', params).catch(() => {});
|
||||
Lbryio.call('file', 'view', params)
|
||||
.then(() => claimEligibleRewards())
|
||||
.catch(() => {});
|
||||
this.setState({ fileViewLogged: true });
|
||||
};
|
||||
|
||||
|
||||
@@ -121,6 +121,7 @@ class PublishPage extends React.PureComponent {
|
||||
otherLicenseDescription: '',
|
||||
name: null,
|
||||
price: 0,
|
||||
currency: 'LBC',
|
||||
uri: null,
|
||||
tags: [],
|
||||
selectedChannel: null,
|
||||
@@ -241,6 +242,7 @@ class PublishPage extends React.PureComponent {
|
||||
licenseUrl,
|
||||
otherLicenseDescription,
|
||||
name,
|
||||
currency: fee && fee.currency ? fee.currency : 'LBC',
|
||||
price: fee && fee.amount ? fee.amount : 0,
|
||||
priceSet: fee && fee.amount > 0,
|
||||
tags: tags && tags.length > 0 ? tags : [],
|
||||
@@ -296,6 +298,7 @@ class PublishPage extends React.PureComponent {
|
||||
bid,
|
||||
channelName,
|
||||
currentMedia,
|
||||
currency,
|
||||
description,
|
||||
language,
|
||||
license,
|
||||
@@ -339,7 +342,7 @@ class PublishPage extends React.PureComponent {
|
||||
otherLicenseDescription,
|
||||
name: name || undefined,
|
||||
contentIsFree: !priceSet,
|
||||
fee: { currency: 'LBC', amount: price },
|
||||
fee: { currency, amount: price },
|
||||
uri: uri || undefined,
|
||||
channel: CLAIM_VALUES.CHANNEL_ANONYMOUS === channelName ? null : channelName,
|
||||
isStillEditing: false,
|
||||
@@ -689,6 +692,10 @@ class PublishPage extends React.PureComponent {
|
||||
}
|
||||
};
|
||||
|
||||
handleCurrencyValueChange = currency => {
|
||||
this.setState({ currency });
|
||||
};
|
||||
|
||||
handleDescriptionChange = description => {
|
||||
this.setState({ description });
|
||||
};
|
||||
@@ -920,7 +927,16 @@ class PublishPage extends React.PureComponent {
|
||||
value={String(this.state.price)}
|
||||
onChangeText={this.handlePriceChange}
|
||||
/>
|
||||
<Text style={publishStyle.currency}>LBC</Text>
|
||||
<Picker
|
||||
style={publishStyle.currencyPicker}
|
||||
enabled={this.state.canPublish && !this.state.publishStarted}
|
||||
selectedValue={this.state.currency}
|
||||
itemStyle={publishStyle.pickerItem}
|
||||
onValueChange={this.handleCurrencyValueChange}
|
||||
>
|
||||
<Picker.Item label={'LBC'} value={'LBC'} />
|
||||
<Picker.Item label={'USD'} value={'USD'} />
|
||||
</Picker>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
|
||||
@@ -362,6 +362,9 @@ const publishStyle = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
currencyPicker: {
|
||||
width: 100,
|
||||
},
|
||||
fullCentered: {
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
|
||||
Reference in new issue
Block a user