feat(search): composer focus after jump-to-message (Phase 519)
Emit composer-focus-channel when jump-to-message resolves in guild mode so search and pin jumps restore composer autofocus like Discord. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -734,6 +734,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
||||
}
|
||||
if (t === 'jump-to-message') {
|
||||
const result = await platform.jumpToMessage(msg.messageId)
|
||||
if (platform.activeChannelId && platform.mode === 'guild') {
|
||||
send({
|
||||
type: 'composer-focus-channel',
|
||||
channelId: platform.activeChannelId
|
||||
})
|
||||
}
|
||||
pushState()
|
||||
send({ type: 'jump-to-message-result', ...result })
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user