New user home feed fixes (#2421)
* Readd discover to default feeds for new users * Fallback just to discover in home when mergefeed is disabled * Always provide a cursor with mergefeed (no 'end of feed' condition)zio/stable
parent
34817628e1
commit
8a4a8af61c
|
@ -98,7 +98,7 @@ export class MergeFeedAPI implements FeedAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
cursor: posts.length ? String(this.itemCursor) : undefined,
|
cursor: String(this.itemCursor),
|
||||||
feed: posts,
|
feed: posts,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,8 +117,8 @@ export async function DEFAULT_FEEDS(
|
||||||
} else {
|
} else {
|
||||||
// production
|
// production
|
||||||
return {
|
return {
|
||||||
pinned: [],
|
pinned: [PROD_DEFAULT_FEED('whats-hot')],
|
||||||
saved: [],
|
saved: [PROD_DEFAULT_FEED('whats-hot')],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ import {useSession} from '#/state/session'
|
||||||
import {loadString, saveString} from '#/lib/storage'
|
import {loadString, saveString} from '#/lib/storage'
|
||||||
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
||||||
import {clamp} from '#/lib/numbers'
|
import {clamp} from '#/lib/numbers'
|
||||||
|
import {PROD_DEFAULT_FEED} from '#/lib/constants'
|
||||||
|
|
||||||
type Props = NativeStackScreenProps<HomeTabNavigatorParams, 'Home'>
|
type Props = NativeStackScreenProps<HomeTabNavigatorParams, 'Home'>
|
||||||
export function HomeScreen(props: Props) {
|
export function HomeScreen(props: Props) {
|
||||||
|
@ -109,7 +110,9 @@ function HomeScreenReady({
|
||||||
const homeFeedParams = React.useMemo<FeedParams>(() => {
|
const homeFeedParams = React.useMemo<FeedParams>(() => {
|
||||||
return {
|
return {
|
||||||
mergeFeedEnabled: Boolean(preferences.feedViewPrefs.lab_mergeFeedEnabled),
|
mergeFeedEnabled: Boolean(preferences.feedViewPrefs.lab_mergeFeedEnabled),
|
||||||
mergeFeedSources: preferences.feeds.saved,
|
mergeFeedSources: preferences.feedViewPrefs.lab_mergeFeedEnabled
|
||||||
|
? preferences.feeds.saved
|
||||||
|
: [PROD_DEFAULT_FEED('whats-hot')],
|
||||||
}
|
}
|
||||||
}, [preferences])
|
}, [preferences])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue