properly store last used uri
This commit is contained in:
@@ -137,6 +137,7 @@ export function StepFinished() {
|
||||
setUsedStarterPack({
|
||||
...usedStarterPack,
|
||||
initialFeed: starterPack?.feeds?.[0].uri ?? 'following',
|
||||
lastUsedUri: usedStarterPack.uri,
|
||||
})
|
||||
}
|
||||
} catch (e: any) {
|
||||
|
||||
@@ -98,7 +98,7 @@ function HomeScreenReady({
|
||||
const lastPagerReportedIndexRef = React.useRef(selectedIndex)
|
||||
React.useLayoutEffect(() => {
|
||||
let initialIndex = selectedIndex
|
||||
if (usedStarterPack) {
|
||||
if (usedStarterPack?.initialFeed) {
|
||||
if (usedStarterPack.initialFeed === 'following') {
|
||||
initialIndex = allFeeds.findIndex(f => f === 'following')
|
||||
} else {
|
||||
@@ -109,7 +109,10 @@ function HomeScreenReady({
|
||||
if (initialIndex === -1) {
|
||||
initialIndex = 0
|
||||
}
|
||||
setUsedStarterPack(undefined)
|
||||
setUsedStarterPack({
|
||||
...usedStarterPack,
|
||||
initialFeed: undefined,
|
||||
})
|
||||
}
|
||||
|
||||
// Since the pager is not a controlled component, adjust it imperatively
|
||||
|
||||
Reference in New Issue
Block a user