diff --git a/src/component/claimList/view.js b/src/component/claimList/view.js index b9df926..d527c48 100644 --- a/src/component/claimList/view.js +++ b/src/component/claimList/view.js @@ -12,7 +12,7 @@ import claimListStyle from 'styles/claimList'; import discoverStyle from 'styles/discover'; import moment from 'moment'; -const horizontalLimit = 7; +const horizontalLimit = 10; const softLimit = 500; class ClaimList extends React.PureComponent { diff --git a/src/component/fileItem/index.js b/src/component/fileItem/index.js index 21a68e1..33f2b3d 100644 --- a/src/component/fileItem/index.js +++ b/src/component/fileItem/index.js @@ -10,13 +10,15 @@ import { makeSelectClaimIsNsfw, makeSelectShortUrlForUri, } from 'lbry-redux'; -import { selectRewardContentClaimIds } from 'lbryinc'; +import { selectBlackListedOutpoints, selectFilteredOutpoints, selectRewardContentClaimIds } from 'lbryinc'; import { selectShowNsfw } from 'redux/selectors/settings'; import FileItem from './view'; const select = (state, props) => ({ + blackListedOutpoints: selectBlackListedOutpoints(state), claim: makeSelectClaimForUri(props.uri)(state), fileInfo: makeSelectFileInfoForUri(props.uri)(state), + filteredOutpoints: selectFilteredOutpoints(state), metadata: makeSelectMetadataForUri(props.uri)(state), rewardedContentClaimIds: selectRewardContentClaimIds(state), isResolvingUri: makeSelectIsUriResolving(props.uri)(state), diff --git a/src/component/fileItem/view.js b/src/component/fileItem/view.js index 6f38554..cf2db92 100644 --- a/src/component/fileItem/view.js +++ b/src/component/fileItem/view.js @@ -40,10 +40,12 @@ class FileItem extends React.PureComponent { render() { const { + blackListedOutpoints, claim, title, thumbnail, fileInfo, + filteredOutpoints, metadata, isResolvingUri, rewardedContentClaimIds, @@ -58,7 +60,17 @@ class FileItem extends React.PureComponent { } = this.props; if (claim && claim.value_type === 'channel') { - // don't display channels in the lists on the Explore page + // don't display channels in the lists on the Your tags page + return null; + } + + let shouldHide = false; + if (blackListedOutpoints || filteredOutpoints) { + const outpointsToHide = blackListedOutpoints.concat(filteredOutpoints); + shouldHide = outpointsToHide.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout); + } + if (shouldHide) { + // don't display blacklisted or filtered outpoints on the Your tags page return null; } diff --git a/src/index.js b/src/index.js index 92993bb..7588c20 100644 --- a/src/index.js +++ b/src/index.js @@ -53,7 +53,6 @@ import thunk from 'redux-thunk'; const globalExceptionHandler = (error, isFatal) => { if (error && NativeModules.Firebase) { - console.log(error); NativeModules.Firebase.logException(isFatal, error.message ? error.message : 'No message', JSON.stringify(error)); } }; diff --git a/src/page/firstRun/view.js b/src/page/firstRun/view.js index edeadcf..f3a24ea 100644 --- a/src/page/firstRun/view.js +++ b/src/page/firstRun/view.js @@ -94,11 +94,15 @@ class FirstRunScreen extends React.PureComponent { Lbry.wallet_status().then(status => { // unlock the wallet if (status.is_locked) { - Lbry.wallet_unlock({ password: this.state.walletPassword ? this.state.walletPassword : '' }) - .then(() => this.closeFinalPage()) - .catch(err => - notify({ message: 'The wallet could not be unlocked at this time. Please restart the app.' }) - ); + Lbry.wallet_unlock({ password: this.state.walletPassword ? this.state.walletPassword : '' }).then( + unlocked => { + if (unlocked) { + this.closeFinalPage(); + } else { + notify({ message: 'The wallet could not be unlocked at this time. Please restart the app.' }); + } + } + ); } else { // wallet not locked. close final page this.closeFinalPage(); diff --git a/src/page/splash/view.js b/src/page/splash/view.js index 5c6eb7b..ac5a58c 100644 --- a/src/page/splash/view.js +++ b/src/page/splash/view.js @@ -110,13 +110,10 @@ class SplashScreen extends React.PureComponent { doPreferenceGet( 'shared', preference => { - console.log('***'); - console.log(preference); populateSharedUserState(preference); }, error => { /* failed */ - console.log(error); } ); }; @@ -192,15 +189,17 @@ class SplashScreen extends React.PureComponent { }); // unlock the wallet and then finish the splash screen - Lbry.wallet_unlock({ password: password || '' }) - .then(() => { + Lbry.wallet_unlock({ password: password || '' }).then(unlocked => { + if (unlocked) { this.setState({ message: testingNetwork, details: waitingForResolution, }); this.finishSplashScreen(); - }) - .catch(() => this.handleAccountUnlockFailed()); + } else { + this.handleAccountUnlockFailed(); + } + }); } else { this.setState({ message: testingNetwork, diff --git a/src/page/verification/internal/sync-verify-page.js b/src/page/verification/internal/sync-verify-page.js index e75f282..952bc49 100644 --- a/src/page/verification/internal/sync-verify-page.js +++ b/src/page/verification/internal/sync-verify-page.js @@ -81,13 +81,15 @@ class SyncVerifyPage extends React.PureComponent { // unlock the wallet (if locked) Lbry.wallet_status().then(status => { if (status.is_locked) { - Lbry.wallet_unlock({ password: this.state.password ? this.state.password : '' }) - .then(() => navigation.goBack()) - .catch(err => { + Lbry.wallet_unlock({ password: this.state.password ? this.state.password : '' }).then(unlocked => { + if (unlocked) { + navigation.goBack(); + } else { if (notifyUnlockFailed) { notify({ message: 'The wallet could not be unlocked at this time. Please restart the app.' }); } - }); + } + }); } else { navigation.goBack(); }