diff --git a/src/view/com/notifications/FeedItem.tsx b/src/view/com/notifications/FeedItem.tsx index b97faa4c..474fb8c6 100644 --- a/src/view/com/notifications/FeedItem.tsx +++ b/src/view/com/notifications/FeedItem.tsx @@ -27,7 +27,6 @@ import {useAnimatedValue} from '../../lib/hooks/useAnimatedValue' const MAX_AUTHORS = 8 const EXPANDED_AUTHOR_EL_HEIGHT = 35 -const EXPANDED_AUTHORS_CLOSE_EL_HEIGHT = 26 interface Author { href: string @@ -163,16 +162,15 @@ export const FeedItem = observer(function FeedItem({ 1 ? onToggleAuthorsExpanded : () => {}}> - - {isAuthorsExpanded ? ( - <> - ) : ( - - )} + void +}) { const pal = usePalette('default') + if (!visible) { + return ( + + + + + Hide + + + + ) + } if (authors.length === 1) { return ( @@ -258,17 +282,14 @@ function CondensedAuthorsList({authors}: {authors: Author[]}) { function ExpandedAuthorsList({ visible, authors, - onToggleAuthorsExpanded, }: { visible: boolean authors: Author[] - onToggleAuthorsExpanded: () => void }) { const pal = usePalette('default') const heightInterp = useAnimatedValue(visible ? 1 : 0) const targetHeight = - authors.length * (EXPANDED_AUTHOR_EL_HEIGHT + 10) /*10=margin*/ + - EXPANDED_AUTHORS_CLOSE_EL_HEIGHT + authors.length * (EXPANDED_AUTHOR_EL_HEIGHT + 10) /*10=margin*/ const heightStyle = { height: Animated.multiply(heightInterp, targetHeight), overflow: 'hidden', @@ -282,18 +303,6 @@ function ExpandedAuthorsList({ }, [heightInterp, visible]) return ( - - - - Hide - - {authors.map(author => (