mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-02-11 17:55:49 +00:00
added icon for ui group chat msgs
This commit is contained in:
parent
7086aa69a6
commit
dbfdb75cee
@ -501,6 +501,8 @@ const handleNotification = async (groups) => {
|
||||
|
||||
let isFocused;
|
||||
const data = groups.filter((group) => group?.sender !== address && !mutedGroups.includes(group.groupId) && !isUpdateMsg(group?.data));
|
||||
const dataWithUpdates = groups.filter((group) => group?.sender !== address && !mutedGroups.includes(group.groupId));
|
||||
|
||||
try {
|
||||
if(isDisableNotifications) return
|
||||
if (!data || data?.length === 0) return;
|
||||
@ -619,7 +621,7 @@ const handleNotification = async (groups) => {
|
||||
}
|
||||
} finally {
|
||||
if (!data || data?.length === 0) return;
|
||||
setChatHeads(data);
|
||||
setChatHeads(dataWithUpdates);
|
||||
// chrome.runtime.sendMessage(
|
||||
// {
|
||||
// action: "setChatHeads",
|
||||
|
@ -133,7 +133,8 @@ export const ChatGroup = ({selectedGroup, secretKey, setSecretKey, getSecretKey,
|
||||
id: item.signature,
|
||||
text: item?.decryptedData?.message || "",
|
||||
repliedTo: item?.repliedTo || item?.decryptedData?.repliedTo,
|
||||
unread: item?.sender === myAddress ? false : !!item?.chatReference ? false : true
|
||||
unread: item?.sender === myAddress ? false : !!item?.chatReference ? false : true,
|
||||
isNotEncrypted: !!item?.messageText
|
||||
}
|
||||
} )
|
||||
setMessages((prev)=> [...prev, ...formatted])
|
||||
@ -210,6 +211,7 @@ export const ChatGroup = ({selectedGroup, secretKey, setSecretKey, getSecretKey,
|
||||
id: item.signature,
|
||||
text: item?.decryptedData?.message || "",
|
||||
repliedTo: item?.repliedTo || item?.decryptedData?.repliedTo,
|
||||
isNotEncrypted: !!item?.messageText,
|
||||
unread: false
|
||||
}
|
||||
} )
|
||||
|
@ -15,7 +15,7 @@ import { WrapperUserAction } from "../WrapperUserAction";
|
||||
import ReplyIcon from "@mui/icons-material/Reply";
|
||||
import { Spacer } from "../../common/Spacer";
|
||||
import { ReactionPicker } from "../ReactionPicker";
|
||||
|
||||
import KeyOffIcon from '@mui/icons-material/KeyOff';
|
||||
export const MessageItem = ({
|
||||
message,
|
||||
onSeen,
|
||||
@ -113,6 +113,7 @@ export const MessageItem = ({
|
||||
>
|
||||
{message?.senderName || message?.sender}
|
||||
</Typography>
|
||||
|
||||
</WrapperUserAction>
|
||||
<Box sx={{
|
||||
display: 'flex',
|
||||
@ -243,7 +244,18 @@ export const MessageItem = ({
|
||||
)
|
||||
})}
|
||||
</Box>
|
||||
|
||||
<Box sx={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: '15px'
|
||||
}}>
|
||||
{message?.isNotEncrypted && (
|
||||
<KeyOffIcon sx={{
|
||||
color: 'white',
|
||||
marginLeft: '10px'
|
||||
}} />
|
||||
)}
|
||||
|
||||
{isUpdating ? (
|
||||
<Typography
|
||||
sx={{
|
||||
@ -275,6 +287,7 @@ export const MessageItem = ({
|
||||
{formatTimestamp(message.timestamp)}
|
||||
</Typography>
|
||||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user