ChatBarButtons: Fix Send Button

This commit is contained in:
thororen1234 2025-11-11 16:52:54 -05:00
parent fb273cd136
commit 9095789f8a
No known key found for this signature in database

View file

@ -83,13 +83,12 @@ const logger = new Logger("ChatButtons");
export function _injectButtons(buttons: { key: string, node: ReactNode; }[], order: Record<string, number | null>, props: ChatBarProps) {
if (props.disabled) return;
let anchorIndex = -100;
let currentOrder = anchorIndex - 1;
let anchorIndex = -1;
let currentOrder = anchorIndex + 1;
for (const [key, Button] of buttonFactories) {
order[key] = anchorIndex;
order.submit && (order.submit = ++currentOrder);
anchorIndex = currentOrder + 1;
anchorIndex = --currentOrder;
buttons.push({
key,