feat(channels): select channel and composer focus after create-channel (v0.8.420)
Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -114,6 +114,8 @@ After `create-thread`, `create-forum-post`, `mark-all-notifications-read`, or `o
|
||||
|
||||
```javascript
|
||||
send({ type: 'composer-focus-channel', channelId: thread.id })
|
||||
|
||||
**v0.8.420 (Phase 457):** `create-channel` selects the new channel and emits `composer-focus-channel` (see [CHANNELS.md](../../docs/CHANNELS.md)).
|
||||
// mark-all: channelId = platform.activeChannelId
|
||||
// open-notification: channelId = result.channelId || msg.channelId || platform.activeChannelId
|
||||
```
|
||||
|
||||
@@ -965,11 +965,13 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
return true
|
||||
}
|
||||
if (t === 'create-channel') {
|
||||
await platform.createChannel({
|
||||
const channel = await platform.createChannel({
|
||||
name: msg.name,
|
||||
type: msg.channelType,
|
||||
parentId: msg.parentId
|
||||
})
|
||||
await platform.selectChannel(channel.id)
|
||||
send({ type: 'composer-focus-channel', channelId: channel.id })
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user