feat(ui-flow): composer focus after delete and reorder guild roles
Emit composer-focus-channel when custom roles are deleted or reordered. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -1751,11 +1751,23 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
|||||||
}
|
}
|
||||||
if (t === 'delete-guild-custom-role') {
|
if (t === 'delete-guild-custom-role') {
|
||||||
await platform.deleteGuildCustomRole(msg.roleId)
|
await platform.deleteGuildCustomRole(msg.roleId)
|
||||||
|
if (platform.mode === 'guild' && platform.activeChannelId) {
|
||||||
|
send({
|
||||||
|
type: 'composer-focus-channel',
|
||||||
|
channelId: platform.activeChannelId
|
||||||
|
})
|
||||||
|
}
|
||||||
pushState()
|
pushState()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if (t === 'reorder-guild-custom-roles') {
|
if (t === 'reorder-guild-custom-roles') {
|
||||||
await platform.reorderGuildCustomRoles(msg.roleIds || [])
|
await platform.reorderGuildCustomRoles(msg.roleIds || [])
|
||||||
|
if (platform.mode === 'guild' && platform.activeChannelId) {
|
||||||
|
send({
|
||||||
|
type: 'composer-focus-channel',
|
||||||
|
channelId: platform.activeChannelId
|
||||||
|
})
|
||||||
|
}
|
||||||
pushState()
|
pushState()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user