increase timeout

This commit is contained in:
PhilReact 2024-11-20 05:37:18 +02:00
parent a37ea3db92
commit bca62ea3e0
4 changed files with 13 additions and 8 deletions

View File

@ -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)
};

View File

@ -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 = () => {
<Tiptap enableMentions setEditorRef={setEditorRef} onEnter={sendMessage} isChat disableEnter={isMobile ? true : false} isFocusedParent={isFocusedParent} setIsFocusedParent={setIsFocusedParent} membersWithNames={members} />
{!isFocusedParent && (
<div style={{
display: isFocusedParent ? 'none' : 'block'
}}>
<ChatOptions messages={messages} goToMessage={()=> {}} members={members} myName={myName} selectedGroup={selectedGroup}/>
)}
</div>
</Box>
</div>
<Box sx={{
@ -780,7 +783,7 @@ const clearEditorContent = () => {
</CustomButton>
)}
{!isMobile && !isFocusedParent && (
{isFocusedParent && (
<CustomButton
onClick={()=> {
if(isSending) return

View File

@ -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'
}}
>
<MessageItem

View File

@ -24,7 +24,7 @@ window.addEventListener("message", (event) => {
}
});
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