Fixes to feed preference and state sync [APP-678] (#829)

* Remove extraneous custom-feed health check

* Fixes to custom feed preference sync

* Fix lint

* Fix to how preferences are synced to enable membership modifications
This commit is contained in:
Paul Frazee 2023-06-01 14:46:13 -05:00 committed by GitHub
parent f416798c5f
commit e9c84a192b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 165 additions and 141 deletions

View file

@ -436,9 +436,6 @@ export class PostsFeedModel {
} else if (this.feedType === 'home') {
return this.rootStore.agent.getTimeline(params as GetTimeline.QueryParams)
} else if (this.feedType === 'custom') {
this.checkIfCustomFeedIsOnlineAndValid(
params as GetCustomFeed.QueryParams,
)
return this.rootStore.agent.app.bsky.feed.getFeed(
params as GetCustomFeed.QueryParams,
)
@ -448,18 +445,4 @@ export class PostsFeedModel {
)
}
}
private async checkIfCustomFeedIsOnlineAndValid(
params: GetCustomFeed.QueryParams,
) {
const res = await this.rootStore.agent.app.bsky.feed.getFeedGenerator({
feed: params.feed,
})
if (!res.data.isOnline || !res.data.isValid) {
runInAction(() => {
this.error =
'This custom feed is not online or may be experiencing issues.'
})
}
}
}