diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-05-17 15:03:19 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2023-05-17 15:03:19 -0500 |
commit | 0f5b3808f8107ff4f04cda8c3da18ffcdcf6f27f (patch) | |
tree | 3c9e755164bf328f7d11ff987f558f38b04417b4 /src/view/com/feeds/CustomFeed.tsx | |
parent | 2fd3b4ca04622836ad2a65ec8992fd429ecd9fed (diff) | |
download | voidsky-0f5b3808f8107ff4f04cda8c3da18ffcdcf6f27f.tar.zst |
Remove a focus-effect that was triggering a rerender loop
Diffstat (limited to 'src/view/com/feeds/CustomFeed.tsx')
-rw-r--r-- | src/view/com/feeds/CustomFeed.tsx | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/view/com/feeds/CustomFeed.tsx b/src/view/com/feeds/CustomFeed.tsx index 95726be64..8e1a78453 100644 --- a/src/view/com/feeds/CustomFeed.tsx +++ b/src/view/com/feeds/CustomFeed.tsx @@ -13,12 +13,11 @@ import {UserAvatar} from '../util/UserAvatar' import {Button} from '../util/forms/Button' import {observer} from 'mobx-react-lite' import {CustomFeedModel} from 'state/models/feeds/custom-feed' -import {useFocusEffect, useNavigation} from '@react-navigation/native' +import {useNavigation} from '@react-navigation/native' import {NavigationProp} from 'lib/routes/types' import {useStores} from 'state/index' import {pluralize} from 'lib/strings/helpers' import {AtUri} from '@atproto/api' -import {isWeb} from 'platform/detection' export const CustomFeed = observer( ({ @@ -26,26 +25,16 @@ export const CustomFeed = observer( style, showSaveBtn = false, showLikes = false, - reloadOnFocus = false, }: { item: CustomFeedModel style?: StyleProp<ViewStyle> showSaveBtn?: boolean showLikes?: boolean - reloadOnFocus?: boolean }) => { const store = useStores() const pal = usePalette('default') const navigation = useNavigation<NavigationProp>() - // TODO: this is pretty hacky, but it works for now - // causes issues on web - useFocusEffect(() => { - if (reloadOnFocus && !isWeb) { - item.reload() - } - }) - return ( <TouchableOpacity accessibilityRole="button" |