From 12499889833e636efa5af2f5bb95715f168d610c Mon Sep 17 00:00:00 2001 From: feruz Date: Mon, 18 Jan 2021 22:06:22 +0200 Subject: [PATCH] fix promise error --- ios/Podfile.lock | 2 +- src/providers/hive/dhive.js | 3 ++- .../tabs/communities/container/communitiesResultsContainer.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 907f97435..f9be9b3d3 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -715,4 +715,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 1f30c7da5061dbc47185442a6ab4a3c95ac48c04 -COCOAPODS: 1.10.0 +COCOAPODS: 1.9.3 diff --git a/src/providers/hive/dhive.js b/src/providers/hive/dhive.js index d236d1392..4f719deee 100644 --- a/src/providers/hive/dhive.js +++ b/src/providers/hive/dhive.js @@ -314,7 +314,8 @@ export const getCommunities = async ( resolve({}); } } catch (error) { - reject(error); + console.log(error); + resolve({}); } }); diff --git a/src/screens/searchResult/screen/tabs/communities/container/communitiesResultsContainer.js b/src/screens/searchResult/screen/tabs/communities/container/communitiesResultsContainer.js index 83fb08b11..d1373f3f5 100644 --- a/src/screens/searchResult/screen/tabs/communities/container/communitiesResultsContainer.js +++ b/src/screens/searchResult/screen/tabs/communities/container/communitiesResultsContainer.js @@ -46,7 +46,7 @@ const CommunitiesResultsContainer = ({ children, navigation, searchValue }) => { setNoResult(false); getSubscriptions(currentAccount.username).then((subs) => { - getCommunities('', searchValue ? 250 : 20, searchValue, 'rank').then((communities) => { + getCommunities('', searchValue ? 100 : 20, searchValue, 'rank').then((communities) => { communities.forEach((community) => Object.assign(community, { isSubscribed: subs.some(