|
@@ -12,6 +12,7 @@ import ListItemText from '@mui/material/ListItemText';
|
|
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
|
import Badge from '@mui/material/Badge';
|
|
|
import DoneAllIcon from '@mui/icons-material/DoneAll';
|
|
|
+import DoneIcon from '@mui/icons-material/Done';
|
|
|
import PushPinIcon from '@mui/icons-material/PushPin';
|
|
|
import CloseIcon from '@mui/icons-material/Close';
|
|
|
|
|
@@ -204,7 +205,7 @@ const ChatItem = ({chat,handleListItemClick,handleNewMsgs,id,pinned,selectedCom
|
|
|
const [modal, setModal] = useState<boolean>(false);
|
|
|
const open = Boolean(anchorEl);
|
|
|
const { name, lastName, avatarUrl, color, companionId, mute, seen, total, watched,
|
|
|
- typing, online, lastMessage, lastMessageCreatedAt, createdAt } = chat
|
|
|
+ typing, online, lastMessage, lastMessageCreatedAt, createdAt,seenCompanion } = chat
|
|
|
const openedChat = companionId === selectedCompanionId
|
|
|
const handlePin = (id: string, pinned:boolean) => {
|
|
|
pinChat(id,!pinned)
|
|
@@ -253,7 +254,8 @@ const ChatItem = ({chat,handleListItemClick,handleNewMsgs,id,pinned,selectedCom
|
|
|
secondaryTypographyProps={{color:openedChat?'#ffffff':'#000000'}}/>
|
|
|
<ListItemIcon className={classes.listItem_iconRight}>
|
|
|
<div className={classes.listItem_iconTimeChecked}>
|
|
|
- {watched&& <DoneAllIcon style={{ color: openedChat ? '#ffffff' :'#18bd03' }} fontSize='small' />}
|
|
|
+ {watched &&<DoneAllIcon style={{ color: openedChat ? '#ffffff' : '#18bd03' }} fontSize='small' />}
|
|
|
+ {!watched&&seenCompanion < total&& <DoneIcon style={{ color: openedChat ? '#ffffff' :'#18bd03' }} fontSize='small' />}
|
|
|
<Typography className={classes.listItem_icon_time} style={{ color: openedChat ? '#ffffff' : '#1b1b1b' }}
|
|
|
variant="h6" color="initial">
|
|
|
{timeStampEU(lastMessageCreatedAt?lastMessageCreatedAt:createdAt)}
|