feat(reactions): composer focus after toggle-reaction (Phase 521)
Emit composer-focus-channel when toggle-reaction completes in guild mode so reaction toggles restore composer autofocus like Discord. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -1074,6 +1074,12 @@ async function dispatchUiMessage (platform, msg, hooks = {}) {
|
|||||||
}
|
}
|
||||||
if (t === 'toggle-reaction') {
|
if (t === 'toggle-reaction') {
|
||||||
await platform.toggleReaction(msg.messageId, msg.emoji)
|
await platform.toggleReaction(msg.messageId, msg.emoji)
|
||||||
|
if (platform.activeChannelId && platform.mode === 'guild') {
|
||||||
|
send({
|
||||||
|
type: 'composer-focus-channel',
|
||||||
|
channelId: platform.activeChannelId
|
||||||
|
})
|
||||||
|
}
|
||||||
pushState()
|
pushState()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user