Show parent post in composer when replying (close #3)
This commit is contained in:
parent
0840c3f8f7
commit
fbcf0d79d1
5 changed files with 66 additions and 5 deletions
|
@ -16,6 +16,7 @@ import {UserAutocompleteViewModel} from '../../../state/models/user-autocomplete
|
|||
import {Autocomplete} from './Autocomplete'
|
||||
import Toast from '../util/Toast'
|
||||
import ProgressCircle from '../util/ProgressCircle'
|
||||
import {TextLink} from '../util/Link'
|
||||
import {useStores} from '../../../state'
|
||||
import * as apilib from '../../../state/lib/api'
|
||||
import {ComposerOpts} from '../../../state/models/shell-ui'
|
||||
|
@ -163,6 +164,21 @@ export const ComposePost = observer(function ComposePost({
|
|||
<Text style={s.red4}>{error}</Text>
|
||||
</View>
|
||||
)}
|
||||
{replyTo ? (
|
||||
<View>
|
||||
<Text style={s.gray4}>
|
||||
Replying to{' '}
|
||||
<TextLink
|
||||
href={`/profile/${replyTo.author.handle}`}
|
||||
text={'@' + replyTo.author.handle}
|
||||
style={[s.bold, s.gray5]}
|
||||
/>
|
||||
</Text>
|
||||
<View style={styles.replyToPost}>
|
||||
<Text style={s.gray5}>{replyTo.text}</Text>
|
||||
</View>
|
||||
</View>
|
||||
) : undefined}
|
||||
<TextInput
|
||||
multiline
|
||||
scrollEnabled
|
||||
|
@ -250,4 +266,13 @@ const styles = StyleSheet.create({
|
|||
padding: 5,
|
||||
fontSize: 21,
|
||||
},
|
||||
replyToPost: {
|
||||
paddingHorizontal: 8,
|
||||
paddingVertical: 6,
|
||||
borderWidth: 1,
|
||||
borderColor: colors.gray2,
|
||||
borderRadius: 6,
|
||||
marginTop: 5,
|
||||
marginBottom: 10,
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue