about summary refs log tree commit diff
path: root/src/view/com/algos/AlgoItem.tsx
diff options
context:
space:
mode:
authorAnsh Nanda <anshnanda10@gmail.com>2023-05-15 12:31:27 -0700
committerAnsh Nanda <anshnanda10@gmail.com>2023-05-15 12:31:27 -0700
commit6249bb16cad1dbcf1930282e564595817735932f (patch)
tree013a5546baa5a1b37dd0a08982ebb51fb8232dc2 /src/view/com/algos/AlgoItem.tsx
parentd7e39bde12e05ccc31b2cdbdfa214c0a8e08fc54 (diff)
downloadvoidsky-6249bb16cad1dbcf1930282e564595817735932f.tar.zst
remove tab bar underline animation
Diffstat (limited to 'src/view/com/algos/AlgoItem.tsx')
-rw-r--r--src/view/com/algos/AlgoItem.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/view/com/algos/AlgoItem.tsx b/src/view/com/algos/AlgoItem.tsx
index 51de89bd6..04117e589 100644
--- a/src/view/com/algos/AlgoItem.tsx
+++ b/src/view/com/algos/AlgoItem.tsx
@@ -15,9 +15,11 @@ import {observer} from 'mobx-react-lite'
 import {AlgoItemModel} from 'state/models/feeds/algo/algo-item'
 import {useNavigation} from '@react-navigation/native'
 import {NavigationProp} from 'lib/routes/types'
+import {useStores} from 'state/index'
 
 const AlgoItem = observer(
   ({item, style}: {item: AlgoItemModel; style?: StyleProp<ViewStyle>}) => {
+    const store = useStores()
     const pal = usePalette('default')
     const navigation = useNavigation<NavigationProp>()
 
@@ -64,8 +66,10 @@ const AlgoItem = observer(
               onPress={() => {
                 if (item.data.viewer?.saved) {
                   item.unsave()
+                  store.me.savedFeeds.removeFeed(item.data.uri)
                 } else {
                   item.save()
+                  store.me.savedFeeds.addFeed(item)
                 }
               }}
               label={item.data.viewer?.saved ? 'Unsave' : 'Save'}