Compare commits

..
10 Commits
Author SHA1 Message Date
Akinwale Ariwodola 9b4ef98a3d bumpversion 0.2.0 --> 0.2.1 2018-09-14 14:10:30 -04:00
Akinwale Ariwodola 8a862439cc do not display reward summary if the user is approved for rewards 2018-09-14 13:39:18 -04:00
Akinwale Ariwodola 6719953cf1 fix React Native bundle 2018-09-14 11:52:56 -04:00
Akinwale Ariwodola 2bf73eb961 update state if user data changed 2018-09-14 11:28:34 -04:00
Akinwale Ariwodola fe5d711fea Merge pull request #293 from lbryio/rewards-eligible-check
do not display phone verification action for users who are already reward approved
2018-09-14 08:58:07 -04:00
Akinwale Ariwodola 33c8aaf36f do not display phone verification action for users who are already reward approved 2018-09-14 04:06:23 -04:00
Akinwale Ariwodola d5366b10fa Merge pull request #292 from lbryio/build-doc-fix
update build instructions with missing packages
2018-09-14 03:56:56 -04:00
Akinwale Ariwodola 50d07fd31f update build instructions with missing packages 2018-09-10 15:43:27 -04:00
Akinwale Ariwodola 792d64a33a Merge pull request #285 from lbryio/download-failed-callback
display the play / download button again upon a failure condition
2018-09-08 10:40:54 +01:00
Akinwale Ariwodola adc9550e58 display the play / download button again upon a failure condition 2018-09-08 10:11:52 +01:00
8 changed files with 45 additions and 17 deletions

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ Based on the quickstart instructions at http://buildozer.readthedocs.io/en/lates
```
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install build-essential ccache git libncurses5:i386 libstdc++6:i386 libgtk2.0-0:i386 libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386 python2.7 python2.7-dev openjdk-8-jdk unzip zlib1g-dev zlib1g:i386 m4 libc6-dev-i386
sudo apt-get install autoconf autogen build-essential libtool python python-pip python-openssl ccache git libncurses5:i386 libstdc++6:i386 libgtk2.0-0:i386 libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 libidn11:i386 python2.7 python2.7-dev openjdk-8-jdk unzip zlib1g-dev zlib1g:i386 m4 libc6-dev-i386
```
Alternatively, the JDK available from http://www.oracle.com/technetwork/java/javase/downloads/index.html can be installed instead of the `openjdk-8-jdk` package.
@@ -17,7 +17,7 @@ const select = (state, props) => ({
});
const perform = dispatch => ({
purchaseUri: uri => dispatch(doPurchaseUri(uri)),
purchaseUri: (uri, failureCallback) => dispatch(doPurchaseUri(uri, null, failureCallback)),
restartDownload: (uri, outpoint) => dispatch(doStartDownload(uri, outpoint)),
fetchCostInfo: uri => dispatch(doFetchCostInfoForUri(uri)),
});
+3 -2
View File
@@ -43,7 +43,8 @@ class FileDownloadButton extends React.PureComponent {
doPause,
style,
openFile,
onButtonLayout
onButtonLayout,
onStartDownloadFailed
} = this.props;
if (loading || downloading) {
@@ -73,7 +74,7 @@ class FileDownloadButton extends React.PureComponent {
if (NativeModules.Mixpanel) {
NativeModules.Mixpanel.track('Purchase Uri', { Uri: uri });
}
purchaseUri(uri);
purchaseUri(uri, onStartDownloadFailed);
if (isPlayable && onPlay) {
this.props.onPlay();
}
+1 -1
View File
@@ -26,7 +26,7 @@ class RewardSummary extends React.Component {
render() {
const { fetching, navigation, unclaimedRewardAmount, user } = this.props;
if (this.state.actionsLeft === 0 || unclaimedRewardAmount === 0) {
if ((user && user.is_reward_approved) || this.state.actionsLeft === 0 || unclaimedRewardAmount === 0) {
return null;
}
+7 -1
View File
@@ -397,7 +397,13 @@ class FilePage extends React.PureComponent {
this.startTime = Date.now();
this.setState({ downloadPressed: true, autoPlayMedia: true });
}}
onButtonLayout={() => this.setState({ downloadButtonShown: true })} />}
onButtonLayout={() => this.setState({ downloadButtonShown: true })}
onStartDownloadFailed={() => {
this.startTime = null;
setTimeout(() => {
this.setState({ downloadPressed: false, fileViewLogged: false, mediaLoaded: false });
}, 500);
}} />}
{!fileInfo && <FilePrice uri={uri} style={filePageStyle.filePriceContainer} textStyle={filePageStyle.filePriceText} />}
</View>
{canLoadMedia && fileInfo && <View style={playerBgStyle}
+15 -6
View File
@@ -35,24 +35,33 @@ class RewardsPage extends React.PureComponent {
}
componentWillReceiveProps(nextProps) {
const { emailVerifyErrorMessage, emailVerifyPending } = nextProps;
const { emailVerifyErrorMessage, emailVerifyPending, user } = nextProps;
if (emailVerifyPending) {
this.setState({ verifyRequestStarted: true });
}
if (this.state.verifyRequestStarted && !emailVerifyPending) {
const { user } = nextProps;
this.setState({ verifyRequestStarted: false });
if (!emailVerifyErrorMessage) {
this.setState({
isEmailVerified: true,
isRewardApproved: (user && user.is_reward_approved)
});
this.setState({ isEmailVerified: true });
}
}
if (user) {
// update other checks (if new user data has been retrieved)
this.setState({
isEmailVerified: (user && user.primary_email && user.has_verified_email),
isIdentityVerified: (user && user.is_identity_verified),
isRewardApproved: (user && user.is_reward_approved)
});
}
}
renderVerification() {
if (this.state.isRewardApproved) {
return null;
}
if (!this.state.isEmailVerified || !this.state.isIdentityVerified) {
return (
<View style={[rewardStyle.card, rewardStyle.verification]}>
+16 -4
View File
@@ -163,7 +163,7 @@ export function doSetPlayingUri(uri) {
};
}
export function doLoadVideo(uri) {
export function doLoadVideo(uri, failureCallback) {
return dispatch => {
dispatch({
type: ACTIONS.LOADING_VIDEO_STARTED,
@@ -188,6 +188,10 @@ export function doLoadVideo(uri) {
message: `File timeout for uri ${uri}`,
displayType: ['toast']
}));
if (failureCallback) {
failureCallback();
}
} else {
dispatch(doDownloadFile(uri, streamInfo));
}
@@ -203,11 +207,15 @@ export function doLoadVideo(uri) {
message: `Failed to download ${uri}, please try again. If this problem persists, visit https://lbry.io/faq/support for support.`,
displayType: ['toast']
}));
if (failureCallback) {
failureCallback();
}
});
};
}
export function doPurchaseUri(uri, specificCostInfo) {
export function doPurchaseUri(uri, specificCostInfo, failureCallback) {
return (dispatch, getState) => {
const state = getState();
const balance = selectBalance(state);
@@ -226,11 +234,11 @@ export function doPurchaseUri(uri, specificCostInfo) {
`This will purchase "${title}" for ${formattedCost} ${unit}`,
[
{ text: 'OK', onPress: () => dispatch(doLoadVideo(uri)) },
{ text: 'Cancel', style: 'cancel' }
{ text: 'Cancel', style: 'cancel', onPress: () => failureCallback && failureCallback() }
],
{ cancelable: true });
} else {
dispatch(doLoadVideo(uri));
dispatch(doLoadVideo(uri, failureCallback));
}
}
@@ -260,6 +268,10 @@ export function doPurchaseUri(uri, specificCostInfo) {
message: 'Insufficient credits',
displayType: ['toast']
}));
if (failureCallback) {
failureCallback();
}
Promise.resolve();
return;
}
+1 -1
View File
@@ -1,4 +1,4 @@
__version__ = "0.2.0"
__version__ = "0.2.1"
class ServiceApp(App):
def build(self):