feat(ui-flow): composer focus after delete/reorder channel (Phase 533)
Emit composer-focus-channel when guild mode retains an active channel after delete-channel or reorder-channels IPC. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
Pearcord desktop UI IPC dispatch and automated flow scenarios for Bare smokes. Mirrors `apps/pearcord` pear-pipe message handling.
|
||||
|
||||
**v0.8.496 (Phase 533):** `delete-channel` and `reorder-channels` emit `composer-focus-channel` when `platform.mode === 'guild'` and `activeChannelId` is set. Bundle: `npm run test:phase533-guild-admin` (app repo).
|
||||
|
||||
**v0.8.495 (Phase 532):** `join-invite` emits `composer-focus-channel` when `platform.mode === 'guild'` and `activeChannelId` is set. Bundle: `npm run test:phase532-invites` (app repo).
|
||||
|
||||
**v0.8.490 (Phase 527):** `play-soundboard` emits `composer-focus-channel` in guild mode. Bundle: `npm run test:phase527-soundboard` (app repo).
|
||||
|
||||
@@ -1112,6 +1112,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
parentId: msg.parentId ?? null,
|
||||
channelIds: msg.channelIds || []
|
||||
})
|
||||
if (platform.mode === 'guild' && platform.activeChannelId) {
|
||||
send({
|
||||
type: 'composer-focus-channel',
|
||||
channelId: platform.activeChannelId
|
||||
})
|
||||
}
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
@@ -1130,6 +1136,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
}
|
||||
if (t === 'delete-channel') {
|
||||
await platform.deleteChannel(msg.channelId)
|
||||
if (platform.mode === 'guild' && platform.activeChannelId) {
|
||||
send({
|
||||
type: 'composer-focus-channel',
|
||||
channelId: platform.activeChannelId
|
||||
})
|
||||
}
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user