diff --git a/src/view/com/pager/FeedsTabBarMobile.tsx b/src/view/com/pager/FeedsTabBarMobile.tsx index 6615dc8c93..5be1a846ab 100644 --- a/src/view/com/pager/FeedsTabBarMobile.tsx +++ b/src/view/com/pager/FeedsTabBarMobile.tsx @@ -124,6 +124,7 @@ export function FeedsTabBar( const styles = StyleSheet.create({ tabBar: { + // @ts-ignore web-only position: isWeb ? 'fixed' : 'absolute', zIndex: 1, left: 0, diff --git a/src/view/com/util/Views.web.tsx b/src/view/com/util/Views.web.tsx index 54833e9d75..3742faf941 100644 --- a/src/view/com/util/Views.web.tsx +++ b/src/view/com/util/Views.web.tsx @@ -139,9 +139,12 @@ export const FlatList = React.forwardRef(function FlatListImpl( {(data as Array).map((item, index) => ( - - {renderItem!({item, index, separators: null as any})} - + + key={keyExtractor!(item, index)} + item={item} + index={index} + renderItem={renderItem} + /> ))} {onEndReached && ( @@ -151,6 +154,25 @@ export const FlatList = React.forwardRef(function FlatListImpl( ) }) +let Row = function RowImpl({ + item, + index, + renderItem, +}: { + item: ItemT + index: number + renderItem: + | null + | undefined + | ((data: {index: number; item: any; separators: any}) => React.ReactNode) +}): React.ReactNode { + if (!renderItem) { + return null + } + return renderItem({item, index, separators: null as any}) +} +Row = React.memo(Row) + let Tail = ({ threshold = 0, onVisible, diff --git a/src/view/shell/desktop/LeftNav.tsx b/src/view/shell/desktop/LeftNav.tsx index 542633105e..1bc735a52d 100644 --- a/src/view/shell/desktop/LeftNav.tsx +++ b/src/view/shell/desktop/LeftNav.tsx @@ -436,6 +436,7 @@ export function DesktopLeftNav() { const styles = StyleSheet.create({ leftNav: { + // @ts-ignore web only position: 'fixed', top: 10, // @ts-ignore web only