diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-12-10 12:01:34 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-10 12:01:34 -0800 |
commit | 28fa5e4919ccf24073ccc92d88efb7e4b73b0b2b (patch) | |
tree | df35206692d0d1adce2a32a2ba8188fb4ac5ad26 /src/view/com/util/post-ctrls/PostCtrls.tsx | |
parent | f5d014d4c7b42213e41f2cbc75d318e6462e6995 (diff) | |
download | voidsky-28fa5e4919ccf24073ccc92d88efb7e4b73b0b2b.tar.zst |
Add "Who can reply" controls [WIP] (#1954)
* Add threadgating * UI improvements * More ui work * Remove comment * Tweak colors * Add missing keys * Tweak sizing * Only show composer option on non-reply * Flex wrap fix * Move the threadgate control to the top of the composer
Diffstat (limited to 'src/view/com/util/post-ctrls/PostCtrls.tsx')
-rw-r--r-- | src/view/com/util/post-ctrls/PostCtrls.tsx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/view/com/util/post-ctrls/PostCtrls.tsx b/src/view/com/util/post-ctrls/PostCtrls.tsx index e548c45f7..c0c5d470e 100644 --- a/src/view/com/util/post-ctrls/PostCtrls.tsx +++ b/src/view/com/util/post-ctrls/PostCtrls.tsx @@ -108,9 +108,16 @@ export function PostCtrls({ <View style={[styles.ctrls, style]}> <TouchableOpacity testID="replyBtn" - style={[styles.ctrl, !big && styles.ctrlPad, {paddingLeft: 0}]} + style={[ + styles.ctrl, + !big && styles.ctrlPad, + {paddingLeft: 0}, + post.viewer?.replyDisabled ? {opacity: 0.5} : undefined, + ]} onPress={() => { - requireAuth(() => onPressReply()) + if (!post.viewer?.replyDisabled) { + requireAuth(() => onPressReply()) + } }} accessibilityRole="button" accessibilityLabel={`Reply (${post.replyCount} ${ |