Fix pills are not scrollable horizontally in Suggested Accounts

This commit is contained in:
Oleksii Bulenok
2026-07-13 14:02:50 +02:00
parent c2e7739e3e
commit 9014d5a0d3
2 changed files with 63 additions and 61 deletions
+9 -4
View File
@@ -10,6 +10,7 @@ import {useLingui} from '@lingui/react'
import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
import {DraggableScrollView} from '#/view/com/pager/DraggableScrollView'
import {BlockDrawerGesture} from '#/view/shell/BlockDrawerGesture'
import {atoms as a, tokens, useTheme, web} from '#/alf'
import {transparentifyColor} from '#/alf/util/colorGeneration'
import {Button, ButtonIcon} from '#/components/Button'
@@ -199,10 +200,13 @@ export function InterestTabs({
}, [])
return (
// `collapsable={false}` keeps this as a real host view on the new arch so
// that a wrapping GestureDetector (e.g. BlockDrawerGesture) can attach to
// it - otherwise this layout-only view gets flattened away.
<View collapsable={false} style={[a.relative, a.flex_row]}>
<View style={[a.relative, a.flex_row]}>
{/*
* BlockDrawerGesture must wrap the ScrollView directly - Gesture.Native()
* only works when attached to the natively scrollable view. On the new
* arch (Android), attaching it to a wrapper view breaks scrolling.
*/}
<BlockDrawerGesture>
<DraggableScrollView
ref={listRef}
contentContainerStyle={[
@@ -239,6 +243,7 @@ export function InterestTabs({
)
})}
</DraggableScrollView>
</BlockDrawerGesture>
{IS_WEB && canScrollLeft && (
<View
style={[
@@ -8,7 +8,6 @@ import {type InfiniteData} from '@tanstack/react-query'
import {popularInterests, useInterestsDisplayNames} from '#/lib/interests'
import {logger} from '#/logger'
import {usePreferencesQuery} from '#/state/queries/preferences'
import {BlockDrawerGesture} from '#/view/shell/BlockDrawerGesture'
import {atoms as a, useTheme} from '#/alf'
import {boostInterests, InterestTabs} from '#/components/InterestTabs'
import * as ProfileCard from '#/components/ProfileCard'
@@ -71,7 +70,6 @@ export function SuggestedAccountsTabBar({
.sort(boostInterests(personalizedInterests))
return (
<BlockDrawerGesture>
<InterestTabs
interests={hideDefaultTab ? interests : ['all', ...interests]}
selectedInterest={
@@ -90,7 +88,6 @@ export function SuggestedAccountsTabBar({
}
}
/>
</BlockDrawerGesture>
)
}