From d7635dc7ee673e4b0907056f3e99dcd9c7e486e8 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Sun, 5 Jan 2020 11:40:38 +0100 Subject: [PATCH] update doSearch calls --- package-lock.json | 4 ++-- package.json | 2 +- src/component/relatedContent/index.js | 2 +- src/component/relatedContent/view.js | 6 +++--- src/page/file/view.js | 9 ++++++++- src/page/search/index.js | 2 +- src/styles/filePage.js | 5 +++++ 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 95e7bf1..9be36c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7047,8 +7047,8 @@ } }, "lbry-redux": { - "version": "github:lbryio/lbry-redux#2c569a729bb40d45249ca38150b00922162b7ce3", - "from": "github:lbryio/lbry-redux#2c569a729bb40d45249ca38150b00922162b7ce3", + "version": "github:lbryio/lbry-redux#eb8fff0e5afd43be00822b3f476eea9e0eb7b075", + "from": "github:lbryio/lbry-redux#eb8fff0e5afd43be00822b3f476eea9e0eb7b075", "requires": { "proxy-polyfill": "0.1.6", "reselect": "^3.0.0", diff --git a/package.json b/package.json index 1299599..17a1828 100644 --- a/package.json +++ b/package.json @@ -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#2c569a729bb40d45249ca38150b00922162b7ce3", + "lbry-redux": "lbryio/lbry-redux#eb8fff0e5afd43be00822b3f476eea9e0eb7b075", "lbryinc": "lbryio/lbryinc#053ca52f4f7f9bf8eb62a3581b183671a475ad1c", "lodash": ">=4.17.11", "merge": ">=1.2.1", diff --git a/src/component/relatedContent/index.js b/src/component/relatedContent/index.js index c7747e9..055a36f 100644 --- a/src/component/relatedContent/index.js +++ b/src/component/relatedContent/index.js @@ -18,7 +18,7 @@ const select = (state, props) => ({ const perform = dispatch => ({ resolveUris: uris => dispatch(doResolveUris(uris)), - searchRecommended: query => dispatch(doSearch(query, 20, undefined, true, false)), + searchRecommended: (query, claimId) => dispatch(doSearch(query, 20, undefined, true, { related_to: claimId }, false)), }); export default connect( diff --git a/src/component/relatedContent/view.js b/src/component/relatedContent/view.js index 64cd64e..52993c1 100644 --- a/src/component/relatedContent/view.js +++ b/src/component/relatedContent/view.js @@ -13,9 +13,9 @@ export default class RelatedContent extends React.PureComponent { }; componentDidMount() { - const { title, searchRecommended } = this.props; - if (title) { - searchRecommended(title); + const { title, claimId, searchRecommended } = this.props; + if (title && claimId) { + searchRecommended(title, claimId); } } diff --git a/src/page/file/view.js b/src/page/file/view.js index b34f19a..c752e49 100644 --- a/src/page/file/view.js +++ b/src/page/file/view.js @@ -991,6 +991,7 @@ class FilePage extends React.PureComponent { uri={claim && claim.permanent_url ? claim.permanent_url : uri} style={filePageStyle.filePriceContainer} textStyle={filePageStyle.filePriceText} + iconStyle={filePageStyle.filePriceIcon} /> )} @@ -1223,7 +1224,13 @@ class FilePage extends React.PureComponent { {this.state.showRecommended && ( - + )} )} diff --git a/src/page/search/index.js b/src/page/search/index.js index 5e4a3a2..c66c512 100644 --- a/src/page/search/index.js +++ b/src/page/search/index.js @@ -28,7 +28,7 @@ const select = state => ({ }); const perform = dispatch => ({ - search: query => dispatch(doSearch(query, numSearchResults, null, false, false)), + search: query => dispatch(doSearch(query, numSearchResults, null, false, {}, false)), claimSearch: options => dispatch(doClaimSearch(options)), updateSearchQuery: query => dispatch(doUpdateSearchQuery(query)), pushDrawerStack: () => dispatch(doPushDrawerStack(Constants.DRAWER_ROUTE_SEARCH)), diff --git a/src/styles/filePage.js b/src/styles/filePage.js index 9c29db6..aff3122 100644 --- a/src/styles/filePage.js +++ b/src/styles/filePage.js @@ -170,6 +170,8 @@ const filePageStyle = StyleSheet.create({ filePriceContainer: { backgroundColor: Colors.NextLbryGreen, justifyContent: 'center', + alignItems: 'center', + flexDirection: 'row', position: 'absolute', right: 16, top: 16, @@ -183,6 +185,9 @@ const filePageStyle = StyleSheet.create({ textAlign: 'center', color: '#0c604b', }, + filePriceIcon: { + marginRight: 2, + }, actions: { flexDirection: 'row', justifyContent: 'space-between',