Fix parents
This commit is contained in:
@@ -320,7 +320,7 @@ export function filterAndSort(
|
||||
})
|
||||
}
|
||||
|
||||
parentTraversal: for (let pi = i - 1; pi >= i * -1; pi--) {
|
||||
parentTraversal: for (let pi = i - 1; pi >= 0; pi--) {
|
||||
const parentOneDown = thread[pi + 1]
|
||||
const parent = thread[pi]
|
||||
const parentOneUp = thread[pi - 1]
|
||||
@@ -337,7 +337,7 @@ export function filterAndSort(
|
||||
} else if (AppBskyFeedDefs.isThreadItemPost(parent)) {
|
||||
slices.unshift(
|
||||
views.post({
|
||||
item,
|
||||
item: parent,
|
||||
oneUp: parentOneUp,
|
||||
oneDown: parentOneDown,
|
||||
moderationOpts,
|
||||
@@ -372,7 +372,8 @@ export function filterAndSort(
|
||||
const parentMod = getModerationState(parent.moderation)
|
||||
const parentIsHidden = threadgateHiddenReplies.has(item.uri)
|
||||
const parentIsTopLevelReply = item.depth === 1
|
||||
const parentIsModerated = parentIsHidden || parentMod.blurred || parentMod.muted
|
||||
const parentIsModerated =
|
||||
parentIsHidden || parentMod.blurred || parentMod.muted
|
||||
|
||||
if (!parentIsModerated) {
|
||||
/*
|
||||
@@ -471,7 +472,7 @@ export function filterAndSort(
|
||||
return slices
|
||||
}
|
||||
|
||||
export function getModerationState(moderation: ModerationDecision){
|
||||
export function getModerationState(moderation: ModerationDecision) {
|
||||
const modui = moderation.ui('contentList')
|
||||
const blurred = modui.blur || modui.filter
|
||||
const muted = (modui.blurs[0] || modui.filters[0])?.type === 'muted'
|
||||
|
||||
@@ -214,6 +214,34 @@ export function Inner({uri}: {uri: string | undefined}) {
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
} else if (item.type === 'threadSliceBlocked') {
|
||||
return (
|
||||
<View
|
||||
style={[
|
||||
a.p_lg,
|
||||
index !== 0 && a.border_t,
|
||||
t.atoms.border_contrast_low,
|
||||
t.atoms.bg_contrast_25,
|
||||
]}>
|
||||
<Text style={[a.font_bold, a.text_md, t.atoms.text_contrast_medium]}>
|
||||
<Trans>Blocked post.</Trans>
|
||||
</Text>
|
||||
</View>
|
||||
)
|
||||
} else if (item.type === 'threadSliceNotFound') {
|
||||
return (
|
||||
<View
|
||||
style={[
|
||||
a.p_lg,
|
||||
index !== 0 && a.border_t,
|
||||
t.atoms.border_contrast_low,
|
||||
t.atoms.bg_contrast_25,
|
||||
]}>
|
||||
<Text style={[a.font_bold, a.text_md, t.atoms.text_contrast_medium]}>
|
||||
<Trans>Deleted post.</Trans>
|
||||
</Text>
|
||||
</View>
|
||||
)
|
||||
} else if (item.type === 'replyComposer') {
|
||||
return (
|
||||
<View>
|
||||
|
||||
Reference in New Issue
Block a user