diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-08-16 10:46:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-16 10:46:52 -0700 |
commit | 5e63d3164b58552f81b597eff83cba991bea958e (patch) | |
tree | 1fb8ac4d1405a19c6c261f3da7b10244ae83502a /src/view/com/composer/labels | |
parent | 819340dd3c34e89e8cd7126c6f1172aba7a8ebec (diff) | |
download | voidsky-5e63d3164b58552f81b597eff83cba991bea958e.tar.zst |
A set of composer fixes (#1187)
* Don't insert a newline on cmd+entrl (close #1173) * Don't linkify selected text on url-paste (close #1149) * Disable the adult content controls if there is no media on the post (close #1169)
Diffstat (limited to 'src/view/com/composer/labels')
-rw-r--r-- | src/view/com/composer/labels/LabelsBtn.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/view/com/composer/labels/LabelsBtn.tsx b/src/view/com/composer/labels/LabelsBtn.tsx index 1abcbe036..96908d47f 100644 --- a/src/view/com/composer/labels/LabelsBtn.tsx +++ b/src/view/com/composer/labels/LabelsBtn.tsx @@ -11,9 +11,11 @@ import {isNative} from 'platform/detection' export const LabelsBtn = observer(function LabelsBtn({ labels, + hasMedia, onChange, }: { labels: string[] + hasMedia: boolean onChange: (v: string[]) => void }) { const pal = usePalette('default') @@ -23,7 +25,7 @@ export const LabelsBtn = observer(function LabelsBtn({ <Button type="default-light" testID="labelsBtn" - style={styles.button} + style={[styles.button, !hasMedia && styles.dimmed]} accessibilityLabel="Content warnings" accessibilityHint="" onPress={() => { @@ -32,7 +34,7 @@ export const LabelsBtn = observer(function LabelsBtn({ Keyboard.dismiss() } } - store.shell.openModal({name: 'self-label', labels, onChange}) + store.shell.openModal({name: 'self-label', labels, hasMedia, onChange}) }}> <ShieldExclamation style={pal.link} size={26} /> {labels.length > 0 ? ( @@ -53,6 +55,9 @@ const styles = StyleSheet.create({ paddingHorizontal: 14, marginRight: 4, }, + dimmed: { + opacity: 0.4, + }, label: { maxWidth: 100, }, |