feat(discovery): autofocus composer after joining from Explore
Emit composer-focus-channel when join-public-discovery selects a channel so the message composer receives focus after an explore listing join. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -80,6 +80,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
|||||||
}
|
}
|
||||||
if (t === 'join-public-discovery') {
|
if (t === 'join-public-discovery') {
|
||||||
await platform.joinPublicDiscovery(msg.inviteCode)
|
await platform.joinPublicDiscovery(msg.inviteCode)
|
||||||
|
if (platform.activeChannelId) {
|
||||||
|
send({
|
||||||
|
type: 'composer-focus-channel',
|
||||||
|
channelId: platform.activeChannelId
|
||||||
|
})
|
||||||
|
}
|
||||||
pushState()
|
pushState()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user