better handling

This commit is contained in:
Hailey
2024-06-16 23:05:04 -07:00
parent d4631b404a
commit fa004bc8df
2 changed files with 28 additions and 24 deletions
+4 -7
View File
@@ -105,13 +105,10 @@ function HomeScreenReady({
let initialIndex = selectedIndex
if (currentStarterPack?.initialFeed) {
if (currentStarterPack.initialFeed === 'following') {
initialIndex = allFeeds.findIndex(f => f === 'following')
} else {
initialIndex = allFeeds.findIndex(
f => f === `feedgen|${currentStarterPack.initialFeed}`,
)
}
if (initialIndex === -1) {
initialIndex = 1
} else if (allFeeds.length >= 3) {
initialIndex = 2
} else if (initialIndex === -1) {
initialIndex = 0
}
setCurrentStarterPack(undefined)