make sure state is being synced across components
This commit is contained in:
parent
f2e39d8ad2
commit
3f41d3db26
6 changed files with 39 additions and 38 deletions
|
@ -64,11 +64,9 @@ export const CustomFeed = withAuthRequired(
|
|||
style={[styles.saveButton]}
|
||||
onPress={() => {
|
||||
if (currentFeed?.data.viewer?.saved) {
|
||||
currentFeed?.unsave()
|
||||
rootStore.me.savedFeeds.removeFeed(currentFeed!.data.uri)
|
||||
rootStore.me.savedFeeds.unsave(currentFeed!)
|
||||
} else {
|
||||
currentFeed!.save()
|
||||
rootStore.me.savedFeeds.addFeed(currentFeed!)
|
||||
rootStore.me.savedFeeds.save(currentFeed!)
|
||||
}
|
||||
}}
|
||||
label={currentFeed?.data.viewer?.saved ? 'Unsave' : 'Save'}
|
||||
|
|
|
@ -112,7 +112,7 @@ export const HomeScreen = withAuthRequired(
|
|||
feed={algoFeed}
|
||||
renderEmptyState={renderWhatsHotEmptyState}
|
||||
/>
|
||||
{store.me.savedFeeds.feeds.map((f, index) => {
|
||||
{store.me.savedFeeds.pinned.map((f, index) => {
|
||||
return (
|
||||
<FeedPage
|
||||
key={String(2 + index + 1)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue