diff --git a/src/components/Chat/ChatDirect.tsx b/src/components/Chat/ChatDirect.tsx index 848c12a..a053b67 100644 --- a/src/components/Chat/ChatDirect.tsx +++ b/src/components/Chat/ChatDirect.tsx @@ -342,7 +342,7 @@ const clearEditorContent = () => { repliedTo } const sendMessageFunc = async () => { - await sendChatDirect({ chatReference: undefined, messageText: htmlContent, otherData}, selectedDirect?.address, publicKeyOfRecipient, false) + return await sendChatDirect({ chatReference: undefined, messageText: htmlContent, otherData}, selectedDirect?.address, publicKeyOfRecipient, false) }; diff --git a/src/components/Chat/ChatGroup.tsx b/src/components/Chat/ChatGroup.tsx index 858a3fd..e8de1c1 100644 --- a/src/components/Chat/ChatGroup.tsx +++ b/src/components/Chat/ChatGroup.tsx @@ -562,7 +562,7 @@ const clearEditorContent = () => { // const res = await sendChatGroup({groupId: selectedGroup,messageText: encryptSingle}) const sendMessageFunc = async () => { - await sendChatGroup({groupId: selectedGroup,messageText: encryptSingle}) + return await sendChatGroup({groupId: selectedGroup,messageText: encryptSingle}) }; // Add the function to the queue @@ -641,7 +641,7 @@ const clearEditorContent = () => { // const res = await sendChatGroup({groupId: selectedGroup,messageText: encryptSingle}) const sendMessageFunc = async () => { - await sendChatGroup({groupId: selectedGroup,messageText: encryptSingle, chatReference: chatMessage.signature}) + return await sendChatGroup({groupId: selectedGroup,messageText: encryptSingle, chatReference: chatMessage.signature}) }; // Add the function to the queue @@ -745,9 +745,12 @@ const clearEditorContent = () => { - {!isFocusedParent && ( +
+ {}} members={members} myName={myName} selectedGroup={selectedGroup}/> -)} +
{ )} - {!isMobile && !isFocusedParent && ( + {isFocusedParent && ( { if(isSending) return diff --git a/src/components/Chat/ChatList.tsx b/src/components/Chat/ChatList.tsx index f028ba9..fb7f440 100644 --- a/src/components/Chat/ChatList.tsx +++ b/src/components/Chat/ChatList.tsx @@ -273,8 +273,10 @@ export const ChatList = ({ initialMessages, myAddress, tempMessages, chatId, onR width: '100%', // Control width (90% of the parent) padding: '10px 0', display: 'flex', - justifyContent: 'center', + alignItems: 'center', overscrollBehavior: 'none', + flexDirection: 'column', + gap: '5px' }} > { } }); -export const sendMessageBackground = (action, data = {}, timeout = 60000, isExtension, appInfo) => { +export const sendMessageBackground = (action, data = {}, timeout = 120000, isExtension, appInfo) => { return new Promise((resolve, reject) => { const requestId = generateRequestId(); // Unique ID for each request callbackMap.set(requestId, { resolve, reject }); // Store both resolve and reject callbacks