This commit is contained in:
Eric Bailey
2025-07-17 09:39:23 -05:00
parent 94bad758a4
commit 8bd4f80926
+4 -3
View File
@@ -350,7 +350,7 @@ let PostFeed = ({
* Cached value of whether the current feed was selected at startup. We don't * Cached value of whether the current feed was selected at startup. We don't
* want this to update when user swipes. * want this to update when user swipes.
*/ */
const isCurrentFeedAtStartupSelected = useRef(selectedFeed === feed) const [isCurrentFeedAtStartupSelected] = useState(selectedFeed === feed)
const feedItems: FeedRow[] = useMemo(() => { const feedItems: FeedRow[] = useMemo(() => {
// wraps a slice item, and replaces it with a showLessFollowup item // wraps a slice item, and replaces it with a showLessFollowup item
@@ -474,7 +474,7 @@ let PostFeed = ({
* banner is eligible to be shown. * banner is eligible to be shown.
*/ */
if ( if (
isCurrentFeedAtStartupSelected.current && isCurrentFeedAtStartupSelected &&
ageAssuranceBannerState.visible ageAssuranceBannerState.visible
) { ) {
arr.push({ arr.push({
@@ -515,7 +515,7 @@ let PostFeed = ({
* Only insert if this feed was the last selected feed at * Only insert if this feed was the last selected feed at
* startup and the banner is eligible to be shown. * startup and the banner is eligible to be shown.
*/ */
if (isCurrentFeedAtStartupSelected.current) { if (isCurrentFeedAtStartupSelected) {
arr.push({ arr.push({
type: 'ageAssuranceBanner', type: 'ageAssuranceBanner',
key: 'ageAssuranceBanner-' + sliceIndex, key: 'ageAssuranceBanner-' + sliceIndex,
@@ -624,6 +624,7 @@ let PostFeed = ({
areVideoFeedsEnabled, areVideoFeedsEnabled,
hasPressedShowLessUris, hasPressedShowLessUris,
ageAssuranceBannerState, ageAssuranceBannerState,
isCurrentFeedAtStartupSelected,
]) ])
// events // events