mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-20 03:42:10 +03:00
fix communities fetch
This commit is contained in:
parent
7ebe8c64a5
commit
70d864190d
@ -295,7 +295,7 @@ export const getCommunityTitle = async (tag) =>
|
||||
export const getCommunities = async (
|
||||
last = '',
|
||||
limit = 100,
|
||||
query = '',
|
||||
query = null,
|
||||
sort = 'rank',
|
||||
observer = '',
|
||||
) =>
|
||||
|
@ -30,7 +30,7 @@ const CommunitiesContainer = ({ children, navigation }) => {
|
||||
useEffect(() => {
|
||||
getSubscriptions(currentAccount.username).then((subs) => {
|
||||
subs.forEach((item) => item.push(true));
|
||||
getCommunities('', 50, '', 'rank').then((communities) => {
|
||||
getCommunities('', 50, null, 'rank').then((communities) => {
|
||||
communities.forEach((community) =>
|
||||
Object.assign(community, {
|
||||
isSubscribed: subs.some(
|
||||
|
@ -45,7 +45,7 @@ const CommunitiesResultsContainer = ({ children, navigation, searchValue }) => {
|
||||
setData([]);
|
||||
setNoResult(false);
|
||||
|
||||
getCommunities('', searchValue ? 100 : 20, searchValue, 'rank')
|
||||
getCommunities('', searchValue ? 100 : 20, searchValue || null, 'rank')
|
||||
.then((communities) => {
|
||||
if (currentAccount && currentAccount.username) {
|
||||
getSubscriptions(currentAccount.username).then((subs) => {
|
||||
|
Loading…
Reference in New Issue
Block a user