about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/view/com/algos/AlgoItem.tsx6
-rw-r--r--src/view/com/util/post-embeds/index.tsx1
2 files changed, 6 insertions, 1 deletions
diff --git a/src/view/com/algos/AlgoItem.tsx b/src/view/com/algos/AlgoItem.tsx
index b52a7e00d..ffb8791a8 100644
--- a/src/view/com/algos/AlgoItem.tsx
+++ b/src/view/com/algos/AlgoItem.tsx
@@ -24,11 +24,13 @@ const AlgoItem = observer(
     style,
     showBottom = true,
     onLongPress,
+    reloadOnFocus = false,
   }: {
     item: AlgoItemModel
     style?: StyleProp<ViewStyle>
     showBottom?: boolean
     onLongPress?: () => void
+    reloadOnFocus?: boolean
   }) => {
     const store = useStores()
     const pal = usePalette('default')
@@ -36,7 +38,9 @@ const AlgoItem = observer(
 
     // TODO: this is pretty hacky, but it works for now
     useFocusEffect(() => {
-      item.reload()
+      if (reloadOnFocus) {
+        item.reload()
+      }
     })
 
     return (
diff --git a/src/view/com/util/post-embeds/index.tsx b/src/view/com/util/post-embeds/index.tsx
index 3eb2720c0..621bd7c0f 100644
--- a/src/view/com/util/post-embeds/index.tsx
+++ b/src/view/com/util/post-embeds/index.tsx
@@ -174,6 +174,7 @@ export function PostEmbeds({
       <AlgoItem
         item={new AlgoItemModel(store, embed.record)}
         style={[pal.view, pal.border, styles.extOuter]}
+        reloadOnFocus={true}
       />
     )
   }