Fall back to who to follow

zio/stable
Paul Frazee 2023-03-17 18:09:27 -05:00
parent ff39b072f3
commit 025681c2f2
2 changed files with 13 additions and 1 deletions

View File

@ -23,6 +23,18 @@ export class FoafsModel {
makeAutoObservable(this)
}
get hasContent() {
if (this.popular.length > 0) {
return true
}
for (const foaf of this.foafs.values()) {
if (foaf.follows.length) {
return true
}
}
return false
}
fetch = bundleAsync(async () => {
try {
this.isLoading = true

View File

@ -205,7 +205,7 @@ export const SearchScreen = withAuthRequired(
}>
{foafsView.isLoading ? (
<ProfileCardFeedLoadingPlaceholder />
) : foafsView.sources.length ? (
) : foafsView.hasContent ? (
<>
{foafsView.popular.length > 0 && (
<View style={styles.suggestions}>