From e74f94bc72cdbb2282096b8d36677ba6655ab5be Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 7 Mar 2023 15:52:24 -0600 Subject: Big batch of UI updates (#276) * Replace react-native-root-toast with a custom toast that fits the visual style * Tune dark mode colors * Tune colors a bit more * Move the reply prompt to a fixed position in the footer * Fully hide muted posts but give a control to show anyway (close #270) * Improve thread rendering (better clarity on reply lines) * Add follower/following counts to side menu * Fix issues with display name overflows --- src/view/com/post-thread/PostThreadItem.tsx | 31 ++++++----------------------- 1 file changed, 6 insertions(+), 25 deletions(-) (limited to 'src/view/com/post-thread/PostThreadItem.tsx') diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 8eda0962a..1413148a9 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -21,8 +21,8 @@ import {useStores} from 'state/index' import {PostMeta} from '../util/PostMeta' import {PostEmbeds} from '../util/PostEmbeds' import {PostCtrls} from '../util/PostCtrls' +import {PostMutedWrapper} from '../util/PostMuted' import {ErrorMessage} from '../util/error/ErrorMessage' -import {ComposePrompt} from '../composer/Prompt' import {usePalette} from 'lib/hooks/usePalette' const PARENT_REPLY_LINE_LENGTH = 8 @@ -271,23 +271,17 @@ export const PostThreadItem = observer(function PostThreadItem({ - ) } else { return ( - <> + - {record.reply && ( + {item._showParentReplyLine && ( )} - {item.replies?.length !== 0 && ( + {item._showChildReplyLine && ( - {item.post.author.viewer?.muted ? ( - - - This post is by a muted account. - - ) : item.richText?.text ? ( + {item.richText?.text ? ( ) : undefined} - + ) } }) @@ -441,14 +430,6 @@ const styles = StyleSheet.create({ paddingRight: 5, maxWidth: 240, }, - mutedWarning: { - flexDirection: 'row', - alignItems: 'center', - padding: 10, - marginTop: 2, - marginBottom: 6, - borderRadius: 2, - }, postTextContainer: { flexDirection: 'row', alignItems: 'center', -- cgit 1.4.1