diff --git a/src/components/Chat/ChatDirect.tsx b/src/components/Chat/ChatDirect.tsx index ac8b17f..ca09959 100644 --- a/src/components/Chat/ChatDirect.tsx +++ b/src/components/Chat/ChatDirect.tsx @@ -518,9 +518,9 @@ const sendMessage = async ()=> { display: "flex", alignItems: "center", width: "100%", - marginTop: "14px", + marginTop: "7px", + marginBottom: '7px', justifyContent: "center", - height: "15px", }} > { )} - +
{ const parentRef = useRef(); const [messages, setMessages] = useState(initialMessages); @@ -352,6 +352,7 @@ export const ChatList = ({ initialMessages, myAddress, tempMessages, chatId, onR reactions={reactions} isUpdating={isUpdating} isPrivate={isPrivate} + setMobileViewModeKeepOpen={setMobileViewModeKeepOpen} />
diff --git a/src/components/Chat/MessageDisplay.tsx b/src/components/Chat/MessageDisplay.tsx index 56b7dd1..8f205f6 100644 --- a/src/components/Chat/MessageDisplay.tsx +++ b/src/components/Chat/MessageDisplay.tsx @@ -63,7 +63,7 @@ function processText(input) { return wrapper.innerHTML; } -export const MessageDisplay = ({ htmlContent, isReply }) => { +export const MessageDisplay = ({ htmlContent, isReply, setMobileViewModeKeepOpen }) => { const linkify = (text) => { if (!text) return ""; // Return an empty string if text is null or undefined @@ -102,7 +102,9 @@ export const MessageDisplay = ({ htmlContent, isReply }) => { const { service, name, identifier, path } = res; executeEvent("addTab", { data: { service, name, identifier, path } }); executeEvent("open-apps-mode", { }); - + if(setMobileViewModeKeepOpen){ + setMobileViewModeKeepOpen('') + } } } }; diff --git a/src/components/Chat/MessageItem.tsx b/src/components/Chat/MessageItem.tsx index 35454fb..5d648c0 100644 --- a/src/components/Chat/MessageItem.tsx +++ b/src/components/Chat/MessageItem.tsx @@ -35,7 +35,8 @@ export const MessageItem = ({ isUpdating, lastSignature, onEdit, - isPrivate + isPrivate, + setMobileViewModeKeepOpen }) => { const [anchorEl, setAnchorEl] = useState(null); const [selectedReaction, setSelectedReaction] = useState(null); @@ -206,12 +207,13 @@ export const MessageItem = ({ Highlight, Mention ])} + setMobileViewModeKeepOpen={setMobileViewModeKeepOpen} /> )} {reply?.decryptedData?.type === "notification" ? ( ) : ( - + )}
@@ -225,12 +227,13 @@ export const MessageItem = ({ Highlight, Mention ])} + setMobileViewModeKeepOpen={setMobileViewModeKeepOpen} /> )} {message?.decryptedData?.type === "notification" ? ( ) : ( - + )}