feat(ui-flow): handle settings-save and settings-discard IPC (Phase 768)
Push state and emit settings-saved/settings-discarded events so composer focus restores consistently after explicit settings save or discard. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -3152,7 +3152,13 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
|||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if (t === 'settings-open' || t === 'settings-close' || t === 'settings-section-change') {
|
if (
|
||||||
|
t === 'settings-open' ||
|
||||||
|
t === 'settings-close' ||
|
||||||
|
t === 'settings-section-change' ||
|
||||||
|
t === 'settings-save' ||
|
||||||
|
t === 'settings-discard'
|
||||||
|
) {
|
||||||
pushState()
|
pushState()
|
||||||
if (platform.activeChannelId) {
|
if (platform.activeChannelId) {
|
||||||
send({
|
send({
|
||||||
@@ -3167,6 +3173,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
|||||||
scope: msg.scope || 'user',
|
scope: msg.scope || 'user',
|
||||||
guildId: msg.guildId || null
|
guildId: msg.guildId || null
|
||||||
})
|
})
|
||||||
|
} else if (t === 'settings-save' || t === 'settings-discard') {
|
||||||
|
send({
|
||||||
|
type: t === 'settings-save' ? 'settings-saved' : 'settings-discarded',
|
||||||
|
scope: msg.scope || 'user',
|
||||||
|
guildId: msg.guildId || null
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
send({
|
send({
|
||||||
type: t === 'settings-open' ? 'settings-opened' : 'settings-closed',
|
type: t === 'settings-open' ? 'settings-opened' : 'settings-closed',
|
||||||
|
|||||||
Reference in New Issue
Block a user