Tweak feed manip to show cases of A -> B without further children (#4883)
parent
5845e08eee
commit
753a233408
|
@ -428,32 +428,34 @@ function shouldDisplayReplyInFollowing(
|
||||||
// Only show replies from self or people you follow.
|
// Only show replies from self or people you follow.
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (!parentAuthor || !grandparentAuthor || !rootAuthor) {
|
|
||||||
// Don't surface orphaned reply subthreads.
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
if (
|
if (
|
||||||
parentAuthor.did === author.did &&
|
(!parentAuthor || parentAuthor.did === author.did) &&
|
||||||
grandparentAuthor.did === author.did &&
|
(!rootAuthor || rootAuthor.did === author.did) &&
|
||||||
rootAuthor.did === author.did
|
(!grandparentAuthor || grandparentAuthor.did === author.did)
|
||||||
) {
|
) {
|
||||||
// Always show self-threads.
|
// Always show self-threads.
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
// From this point on we need at least one more reason to show it.
|
// From this point on we need at least one more reason to show it.
|
||||||
if (
|
if (
|
||||||
|
parentAuthor &&
|
||||||
parentAuthor.did !== author.did &&
|
parentAuthor.did !== author.did &&
|
||||||
isSelfOrFollowing(parentAuthor, userDid)
|
isSelfOrFollowing(parentAuthor, userDid)
|
||||||
) {
|
) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
|
grandparentAuthor &&
|
||||||
grandparentAuthor.did !== author.did &&
|
grandparentAuthor.did !== author.did &&
|
||||||
isSelfOrFollowing(grandparentAuthor, userDid)
|
isSelfOrFollowing(grandparentAuthor, userDid)
|
||||||
) {
|
) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if (rootAuthor.did !== author.did && isSelfOrFollowing(rootAuthor, userDid)) {
|
if (
|
||||||
|
rootAuthor &&
|
||||||
|
rootAuthor.did !== author.did &&
|
||||||
|
isSelfOrFollowing(rootAuthor, userDid)
|
||||||
|
) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in New Issue