From 652e4461382e180bf4683da42717cfdd7cb6c01f Mon Sep 17 00:00:00 2001 From: daledah Date: Thu, 26 Feb 2026 22:54:14 +0700 Subject: [PATCH] fix: Adding users to group has a noticeable lag --- src/pages/NewChatPage.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/NewChatPage.tsx b/src/pages/NewChatPage.tsx index d21c32ec124ee..caebec07029f5 100755 --- a/src/pages/NewChatPage.tsx +++ b/src/pages/NewChatPage.tsx @@ -329,7 +329,6 @@ function NewChatPage({ref}: NewChatPageProps) { newSelectedOptions = reject(selectedOptions, (selectedOption) => selectedOption.login === option.login); } else { newSelectedOptions = [...selectedOptions, {...option, isSelected: true, selected: true, reportID: option.reportID, keyForList: `${option.keyForList ?? option.reportID}`}]; - selectionListRef?.current?.scrollToIndex(0, true); } selectionListRef?.current?.clearInputAfterSelect?.(); @@ -337,6 +336,9 @@ function NewChatPage({ref}: NewChatPageProps) { selectionListRef.current?.focusTextInput(); } setSelectedOptions(newSelectedOptions); + if (!isOptionInList) { + selectionListRef?.current?.scrollToIndex(0, true); + } if (personalData?.login && personalData?.accountID) { const participants: SelectedParticipant[] = [