Merge branch 'upload-image' into main

zio/stable
Paul Frazee 2022-12-05 11:25:33 -06:00
commit 59363181e1
2 changed files with 12 additions and 8 deletions

View File

@ -1,2 +1,3 @@
export const LOGIN_INCLUDE_DEV_SERVERS = true export const LOGIN_INCLUDE_DEV_SERVERS = true
export const TABS_ENABLED = false export const TABS_ENABLED = false
export const IMAGES_ENABLED = false

View File

@ -26,6 +26,7 @@ import {detectLinkables} from '../../../lib/strings'
import {UserLocalPhotosModel} from '../../../state/models/user-local-photos' import {UserLocalPhotosModel} from '../../../state/models/user-local-photos'
import {PhotoCarouselPicker} from './PhotoCarouselPicker' import {PhotoCarouselPicker} from './PhotoCarouselPicker'
import {SelectedPhoto} from './SelectedPhoto' import {SelectedPhoto} from './SelectedPhoto'
import {IMAGES_ENABLED} from '../../../build-flags'
const MAX_TEXT_LENGTH = 256 const MAX_TEXT_LENGTH = 256
const DANGER_TEXT_LENGTH = MAX_TEXT_LENGTH const DANGER_TEXT_LENGTH = MAX_TEXT_LENGTH
@ -235,7 +236,8 @@ export const ComposePost = observer(function ComposePost({
selectedPhotos={selectedPhotos} selectedPhotos={selectedPhotos}
setSelectedPhotos={setSelectedPhotos} setSelectedPhotos={setSelectedPhotos}
/> />
{localPhotos.photos != null && {IMAGES_ENABLED &&
localPhotos.photos != null &&
text === '' && text === '' &&
selectedPhotos.length === 0 && ( selectedPhotos.length === 0 && (
<PhotoCarouselPicker <PhotoCarouselPicker
@ -244,8 +246,7 @@ export const ComposePost = observer(function ComposePost({
localPhotos={localPhotos} localPhotos={localPhotos}
/> />
)} )}
<View style={styles.separator} /> <View style={styles.bottomBar}>
<View style={[s.flexRow, s.pt10, s.pb10, s.pr5, styles.contentCenter]}>
<View style={s.flex1} /> <View style={s.flex1} />
<Text style={[s.mr10, {color: progressColor}]}> <Text style={[s.mr10, {color: progressColor}]}>
{MAX_TEXT_LENGTH - text.length} {MAX_TEXT_LENGTH - text.length}
@ -348,10 +349,12 @@ const styles = StyleSheet.create({
paddingLeft: 13, paddingLeft: 13,
paddingRight: 8, paddingRight: 8,
}, },
contentCenter: {alignItems: 'center'}, bottomBar: {
separator: { flexDirection: 'row',
borderBottomColor: 'black', paddingVertical: 10,
borderBottomWidth: StyleSheet.hairlineWidth, paddingRight: 5,
width: '100%', alignItems: 'center',
borderTopWidth: 1,
borderTopColor: colors.gray2,
}, },
}) })