Fall back to who to follow
parent
ff39b072f3
commit
025681c2f2
|
@ -23,6 +23,18 @@ export class FoafsModel {
|
||||||
makeAutoObservable(this)
|
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 () => {
|
fetch = bundleAsync(async () => {
|
||||||
try {
|
try {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
|
|
|
@ -205,7 +205,7 @@ export const SearchScreen = withAuthRequired(
|
||||||
}>
|
}>
|
||||||
{foafsView.isLoading ? (
|
{foafsView.isLoading ? (
|
||||||
<ProfileCardFeedLoadingPlaceholder />
|
<ProfileCardFeedLoadingPlaceholder />
|
||||||
) : foafsView.sources.length ? (
|
) : foafsView.hasContent ? (
|
||||||
<>
|
<>
|
||||||
{foafsView.popular.length > 0 && (
|
{foafsView.popular.length > 0 && (
|
||||||
<View style={styles.suggestions}>
|
<View style={styles.suggestions}>
|
||||||
|
|
Loading…
Reference in New Issue