[APP-834] Allow @ing someone in post directly from profile (#1241)
* setup `initMention` for mobile * setup creating post with profile tagged on web
This commit is contained in:
parent
3aadc43c89
commit
16b265a861
9 changed files with 99 additions and 5 deletions
|
@ -150,7 +150,22 @@ const NavItem = observer(
|
|||
|
||||
function ComposeBtn() {
|
||||
const store = useStores()
|
||||
const onPressCompose = () => store.shell.openComposer({})
|
||||
const {getState} = useNavigation()
|
||||
|
||||
const getProfileHandle = () => {
|
||||
const {routes} = getState()
|
||||
const currentRoute = routes[routes.length - 1]
|
||||
if (currentRoute.name === 'Profile') {
|
||||
const {name: handle} =
|
||||
currentRoute.params as CommonNavigatorParams['Profile']
|
||||
if (handle === store.me.handle) return undefined
|
||||
return handle
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
const onPressCompose = () =>
|
||||
store.shell.openComposer({mention: getProfileHandle()})
|
||||
|
||||
return (
|
||||
<TouchableOpacity
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue