feat(ui-flow): composer focus after discovery IPC (Phase 545)
Restore message composer focus after set-discovery-listing, update-discovery-filter, and set-discovery-tags handlers. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -97,6 +97,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
}
|
||||
if (t === 'set-discovery-listing') {
|
||||
await platform.setGuildDiscoveryListing(msg.guildId, msg.listed !== false)
|
||||
if (platform.activeChannelId && platform.mode === 'guild') {
|
||||
send({
|
||||
type: 'composer-focus-channel',
|
||||
channelId: platform.activeChannelId
|
||||
})
|
||||
}
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
@@ -107,6 +113,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
minMembers: msg.minMembers,
|
||||
tag: msg.tag
|
||||
})
|
||||
if (platform.activeChannelId && platform.mode === 'guild') {
|
||||
send({
|
||||
type: 'composer-focus-channel',
|
||||
channelId: platform.activeChannelId
|
||||
})
|
||||
}
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
@@ -122,6 +134,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
}
|
||||
if (t === 'set-discovery-tags') {
|
||||
await platform.setGuildDiscoveryTags(msg.guildId, msg.tags)
|
||||
if (platform.activeChannelId && platform.mode === 'guild') {
|
||||
send({
|
||||
type: 'composer-focus-channel',
|
||||
channelId: platform.activeChannelId
|
||||
})
|
||||
}
|
||||
pushState()
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user