Skip to content

Commit 7541b4f

Browse files
authored
Merge pull request #54 from k4m2a/fix/brand-default-feeds
feat(brand): brand feed as signed-out + default feed, drop video default
2 parents 629eb6f + 3e4793c commit 7541b4f

4 files changed

Lines changed: 11 additions & 17 deletions

File tree

brands/mdparivaar/brand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const brand: Brand = {
104104
{
105105
type: 'feed',
106106
value:
107-
'at://did:plc:ieyfjh6ystyufa3a7pi3jw5q/app.bsky.feed.generator/mdparivaar',
107+
'at://did:plc:ieyfjh6ystyufa3a7pi3jw5q/app.bsky.feed.generator/md-parivaar',
108108
pinned: true,
109109
},
110110
{

src/lib/constants.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,11 @@ export const BSKY_FEED_OWNER_DIDS = [
145145
'did:plc:q6gjnaw2blty4crticxkmujt',
146146
]
147147

148-
export const DISCOVER_FEED_URI =
149-
'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/whats-hot'
148+
// The brand's primary feed doubles as its "discover" feed: it backs the
149+
// signed-out home and drives discover-specific UI (fresh-content polling,
150+
// composer prompt, etc.). For the Bluesky brand this resolves to whats-hot,
151+
// so upstream behavior is unchanged.
152+
export const DISCOVER_FEED_URI = brand.defaultFeeds[0].value
150153
export const VIDEO_FEED_URI =
151154
'at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.generator/thevids'
152155
export const STAGING_VIDEO_FEED_URI =
@@ -158,11 +161,6 @@ export const VIDEO_FEED_URIS = [VIDEO_FEED_URI, STAGING_VIDEO_FEED_URI]
158161
// `src/brand/boot.ts` and the type assertion below.
159162
export const DISCOVER_SAVED_FEED = brand.defaultFeeds[0]
160163
export const TIMELINE_SAVED_FEED = brand.defaultFeeds[1]
161-
export const VIDEO_SAVED_FEED = {
162-
type: 'feed',
163-
value: VIDEO_FEED_URI,
164-
pinned: true,
165-
}
166164

167165
export const RECOMMENDED_SAVED_FEEDS: Pick<
168166
AppBskyActorDefs.SavedFeed,

src/screens/Onboarding/StepFinished/index.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
BSKY_APP_ACCOUNT_DID,
1919
DISCOVER_SAVED_FEED,
2020
TIMELINE_SAVED_FEED,
21-
VIDEO_SAVED_FEED,
2221
} from '#/lib/constants'
2322
import {useRequestNotificationsPermission} from '#/lib/notifications/notifications'
2423
import {logger} from '#/logger'
@@ -108,7 +107,9 @@ export function StepFinished() {
108107
// Interests need to get saved first, then we can write the feeds to prefs
109108
await agent.setInterestsPref({tags: selectedInterests})
110109

111-
// Default feeds that every user should have pinned when landing in the app
110+
// Default feeds that every user should have pinned when landing in
111+
// the app: the brand's primary feed and the following timeline. This
112+
// matches the brand defaults seeded at account creation.
112113
const feedsToSave: AppBskyActorDefs.SavedFeed[] = [
113114
{
114115
...DISCOVER_SAVED_FEED,
@@ -118,10 +119,6 @@ export function StepFinished() {
118119
...TIMELINE_SAVED_FEED,
119120
id: TID.nextStr(),
120121
},
121-
{
122-
...VIDEO_SAVED_FEED,
123-
id: TID.nextStr(),
124-
},
125122
]
126123

127124
// Any starter pack feeds will be pinned _after_ the defaults

src/view/screens/Home.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {ActivityIndicator, StyleSheet} from 'react-native'
33
import {withSpring} from 'react-native-reanimated'
44
import {useFocusEffect} from '@react-navigation/native'
55

6-
import {PROD_DEFAULT_FEED} from '#/lib/constants'
76
import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
87
import {useOTAUpdates} from '#/lib/hooks/useOTAUpdates'
98
import {useSetTitle} from '#/lib/hooks/useSetTitle'
@@ -267,7 +266,7 @@ function HomeScreenReady({
267266
testID="customFeedPage"
268267
isPageFocused
269268
isPageAdjacent={false}
270-
feed={`feedgen|${PROD_DEFAULT_FEED('whats-hot')}`}
269+
feed={pinnedFeedInfos[0].feedDescriptor}
271270
renderEmptyState={renderCustomFeedEmptyState}
272271
feedInfo={pinnedFeedInfos[0]}
273272
/>
@@ -330,7 +329,7 @@ function HomeScreenReady({
330329
testID="customFeedPage"
331330
isPageFocused
332331
isPageAdjacent={false}
333-
feed={`feedgen|${PROD_DEFAULT_FEED('whats-hot')}`}
332+
feed={pinnedFeedInfos[0].feedDescriptor}
334333
renderEmptyState={renderCustomFeedEmptyState}
335334
feedInfo={pinnedFeedInfos[0]}
336335
/>

0 commit comments

Comments
 (0)