Wire settings-open/close UI-flow IPC and category on deep-link format.
Merges settings-open and settings-close with section-change handling so composer focus and pushState stay consistent. format-settings-deep-link accepts category from the renderer for canonical pearcord://settings URLs. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -1322,7 +1322,8 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
const url = platform.formatSettingsDeepLink({
|
||||
section: msg.section,
|
||||
scope: msg.scope,
|
||||
guildId: msg.guildId
|
||||
guildId: msg.guildId,
|
||||
category: msg.category
|
||||
})
|
||||
send({
|
||||
type: 'settings-deep-link',
|
||||
@@ -3151,7 +3152,7 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
}
|
||||
return true
|
||||
}
|
||||
if (t === 'settings-section-change') {
|
||||
if (t === 'settings-open' || t === 'settings-close' || t === 'settings-section-change') {
|
||||
pushState()
|
||||
if (platform.activeChannelId) {
|
||||
send({
|
||||
@@ -3159,11 +3160,21 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
channelId: platform.activeChannelId
|
||||
})
|
||||
}
|
||||
if (t === 'settings-section-change') {
|
||||
send({
|
||||
type: 'settings-section-changed',
|
||||
section: msg.section || null,
|
||||
scope: msg.scope || 'user'
|
||||
scope: msg.scope || 'user',
|
||||
guildId: msg.guildId || null
|
||||
})
|
||||
} else {
|
||||
send({
|
||||
type: t === 'settings-open' ? 'settings-opened' : 'settings-closed',
|
||||
section: msg.section || null,
|
||||
scope: msg.scope || 'user',
|
||||
guildId: msg.guildId || null
|
||||
})
|
||||
}
|
||||
return true
|
||||
}
|
||||
if (t === 'composer-ime-composing') {
|
||||
|
||||
Reference in New Issue
Block a user