fixes, app link in direct

This commit is contained in:
PhilReact 2024-12-21 22:22:04 +02:00
parent d5a45007c4
commit cc5a6d9f33
4 changed files with 15 additions and 9 deletions

View File

@ -518,9 +518,9 @@ const sendMessage = async ()=> {
display: "flex",
alignItems: "center",
width: "100%",
marginTop: "14px",
marginTop: "7px",
marginBottom: '7px',
justifyContent: "center",
height: "15px",
}}
>
<Box
@ -586,7 +586,7 @@ const sendMessage = async ()=> {
</>
)}
<ChatList chatReferences={chatReferences} onEdit={onEdit} onReply={onReply} chatId={selectedDirect?.address} initialMessages={messages} myAddress={myAddress} tempMessages={tempMessages} tempChatReferences={tempChatReferences}/>
<ChatList setMobileViewModeKeepOpen={setMobileViewModeKeepOpen} chatReferences={chatReferences} onEdit={onEdit} onReply={onReply} chatId={selectedDirect?.address} initialMessages={messages} myAddress={myAddress} tempMessages={tempMessages} tempChatReferences={tempChatReferences}/>
<div style={{

View File

@ -6,7 +6,7 @@ import { useInView } from 'react-intersection-observer'
import { Typography } from '@mui/material';
import ErrorBoundary from '../../common/ErrorBoundary';
export const ChatList = ({ initialMessages, myAddress, tempMessages, chatId, onReply, handleReaction, chatReferences, tempChatReferences, isPrivate, onEdit
export const ChatList = ({ initialMessages, myAddress, tempMessages, chatId, onReply, handleReaction, chatReferences, tempChatReferences, isPrivate, onEdit, setMobileViewModeKeepOpen
}) => {
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}
/>
</ErrorBoundary>
</div>

View File

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

View File

@ -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" ? (
<MessageDisplay htmlContent={reply.decryptedData?.data?.message} />
) : (
<MessageDisplay isReply htmlContent={reply.text} />
<MessageDisplay setMobileViewModeKeepOpen={setMobileViewModeKeepOpen} isReply htmlContent={reply.text} />
)}
</Box>
</Box>
@ -225,12 +227,13 @@ export const MessageItem = ({
Highlight,
Mention
])}
setMobileViewModeKeepOpen={setMobileViewModeKeepOpen}
/>
)}
{message?.decryptedData?.type === "notification" ? (
<MessageDisplay htmlContent={message.decryptedData?.data?.message} />
) : (
<MessageDisplay htmlContent={message.text} />
<MessageDisplay setMobileViewModeKeepOpen={setMobileViewModeKeepOpen} htmlContent={message.text} />
)}
<Box
sx={{