revert
This commit is contained in:
@@ -113,16 +113,15 @@ function HomeScreenReady({
|
|||||||
const lastPagerReportedIndexRef = React.useRef(selectedIndex)
|
const lastPagerReportedIndexRef = React.useRef(selectedIndex)
|
||||||
React.useLayoutEffect(() => {
|
React.useLayoutEffect(() => {
|
||||||
let initialIndex = selectedIndex
|
let initialIndex = selectedIndex
|
||||||
console.log(
|
|
||||||
'currentStarterPack.initialFeed',
|
|
||||||
currentStarterPack?.initialFeed,
|
|
||||||
)
|
|
||||||
if (currentStarterPack?.initialFeed) {
|
if (currentStarterPack?.initialFeed) {
|
||||||
if (currentStarterPack.initialFeed === 'following') {
|
if (currentStarterPack.initialFeed === 'following') {
|
||||||
initialIndex = 1
|
initialIndex = allFeeds.findIndex(f => f === 'following')
|
||||||
} else if (allFeeds.length >= 3) {
|
} else {
|
||||||
initialIndex = 2
|
initialIndex = allFeeds.findIndex(
|
||||||
} else if (initialIndex === -1) {
|
f => f === `feedgen|${currentStarterPack.initialFeed}`,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (initialIndex === -1) {
|
||||||
initialIndex = 0
|
initialIndex = 0
|
||||||
}
|
}
|
||||||
setCurrentStarterPack(undefined)
|
setCurrentStarterPack(undefined)
|
||||||
@@ -141,8 +140,8 @@ function HomeScreenReady({
|
|||||||
}, [
|
}, [
|
||||||
selectedIndex,
|
selectedIndex,
|
||||||
allFeeds,
|
allFeeds,
|
||||||
currentStarterPack?.initialFeed,
|
|
||||||
setCurrentStarterPack,
|
setCurrentStarterPack,
|
||||||
|
currentStarterPack?.initialFeed,
|
||||||
])
|
])
|
||||||
|
|
||||||
const {hasSession} = useSession()
|
const {hasSession} = useSession()
|
||||||
|
|||||||
Reference in New Issue
Block a user