mirror of
https://github.com/Qortal/qortal-mobile.git
synced 2025-04-28 13:57:52 +00:00
fixes, app link in direct
This commit is contained in:
parent
d5a45007c4
commit
cc5a6d9f33
@ -518,9 +518,9 @@ const sendMessage = async ()=> {
|
|||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
marginTop: "14px",
|
marginTop: "7px",
|
||||||
|
marginBottom: '7px',
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
height: "15px",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<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={{
|
<div style={{
|
||||||
|
@ -6,7 +6,7 @@ import { useInView } from 'react-intersection-observer'
|
|||||||
import { Typography } from '@mui/material';
|
import { Typography } from '@mui/material';
|
||||||
import ErrorBoundary from '../../common/ErrorBoundary';
|
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 parentRef = useRef();
|
||||||
const [messages, setMessages] = useState(initialMessages);
|
const [messages, setMessages] = useState(initialMessages);
|
||||||
@ -352,6 +352,7 @@ export const ChatList = ({ initialMessages, myAddress, tempMessages, chatId, onR
|
|||||||
reactions={reactions}
|
reactions={reactions}
|
||||||
isUpdating={isUpdating}
|
isUpdating={isUpdating}
|
||||||
isPrivate={isPrivate}
|
isPrivate={isPrivate}
|
||||||
|
setMobileViewModeKeepOpen={setMobileViewModeKeepOpen}
|
||||||
/>
|
/>
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
</div>
|
</div>
|
||||||
|
@ -63,7 +63,7 @@ function processText(input) {
|
|||||||
return wrapper.innerHTML;
|
return wrapper.innerHTML;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const MessageDisplay = ({ htmlContent, isReply }) => {
|
export const MessageDisplay = ({ htmlContent, isReply, setMobileViewModeKeepOpen }) => {
|
||||||
const linkify = (text) => {
|
const linkify = (text) => {
|
||||||
if (!text) return ""; // Return an empty string if text is null or undefined
|
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;
|
const { service, name, identifier, path } = res;
|
||||||
executeEvent("addTab", { data: { service, name, identifier, path } });
|
executeEvent("addTab", { data: { service, name, identifier, path } });
|
||||||
executeEvent("open-apps-mode", { });
|
executeEvent("open-apps-mode", { });
|
||||||
|
if(setMobileViewModeKeepOpen){
|
||||||
|
setMobileViewModeKeepOpen('')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -35,7 +35,8 @@ export const MessageItem = ({
|
|||||||
isUpdating,
|
isUpdating,
|
||||||
lastSignature,
|
lastSignature,
|
||||||
onEdit,
|
onEdit,
|
||||||
isPrivate
|
isPrivate,
|
||||||
|
setMobileViewModeKeepOpen
|
||||||
}) => {
|
}) => {
|
||||||
const [anchorEl, setAnchorEl] = useState(null);
|
const [anchorEl, setAnchorEl] = useState(null);
|
||||||
const [selectedReaction, setSelectedReaction] = useState(null);
|
const [selectedReaction, setSelectedReaction] = useState(null);
|
||||||
@ -206,12 +207,13 @@ export const MessageItem = ({
|
|||||||
Highlight,
|
Highlight,
|
||||||
Mention
|
Mention
|
||||||
])}
|
])}
|
||||||
|
setMobileViewModeKeepOpen={setMobileViewModeKeepOpen}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{reply?.decryptedData?.type === "notification" ? (
|
{reply?.decryptedData?.type === "notification" ? (
|
||||||
<MessageDisplay htmlContent={reply.decryptedData?.data?.message} />
|
<MessageDisplay htmlContent={reply.decryptedData?.data?.message} />
|
||||||
) : (
|
) : (
|
||||||
<MessageDisplay isReply htmlContent={reply.text} />
|
<MessageDisplay setMobileViewModeKeepOpen={setMobileViewModeKeepOpen} isReply htmlContent={reply.text} />
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
@ -225,12 +227,13 @@ export const MessageItem = ({
|
|||||||
Highlight,
|
Highlight,
|
||||||
Mention
|
Mention
|
||||||
])}
|
])}
|
||||||
|
setMobileViewModeKeepOpen={setMobileViewModeKeepOpen}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{message?.decryptedData?.type === "notification" ? (
|
{message?.decryptedData?.type === "notification" ? (
|
||||||
<MessageDisplay htmlContent={message.decryptedData?.data?.message} />
|
<MessageDisplay htmlContent={message.decryptedData?.data?.message} />
|
||||||
) : (
|
) : (
|
||||||
<MessageDisplay htmlContent={message.text} />
|
<MessageDisplay setMobileViewModeKeepOpen={setMobileViewModeKeepOpen} htmlContent={message.text} />
|
||||||
)}
|
)}
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user