diff --git a/src/assets/icons/mute.svg b/src/assets/icons/mute.svg new file mode 100644 index 00000000..daf1036a --- /dev/null +++ b/src/assets/icons/mute.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/routes/chat/SessionList/Session.tsx b/src/routes/chat/SessionList/Session.tsx index fc99695c..f9c263c1 100644 --- a/src/routes/chat/SessionList/Session.tsx +++ b/src/routes/chat/SessionList/Session.tsx @@ -9,6 +9,7 @@ import getUnreadCount, { renderPreviewMessage } from "../utils"; import User from "../../../common/component/User"; import Avatar from "../../../common/component/Avatar"; import IconLock from "../../../assets/icons/lock.svg"; +import IconMute from "../../../assets/icons/mute.svg"; import IconVoicing from "../../../assets/icons/voicing.svg"; import useContextMenu from "../../../common/hook/useContextMenu"; import useUploadFile from "../../../common/hook/useUploadFile"; @@ -106,6 +107,8 @@ const Session: FC = ({ const isVoicing = type == "channel" ? voiceList.some((item) => { return item.context == type && item.id === id; }) : (id == callingFrom || id == callingTo); + console.log("unreads", unreads, isCurrentPath); + return ( = ({ 0 ? `w-36` : ``)}>{renderPreviewMessage(previewMsg)} - {unreads > 0 && !isCurrentPath && ( - - {unreads > 99 ? "99+" : unreads} - - )} + {(unreads > 0 && !isCurrentPath) ? + {unreads > 99 ? "99+" : unreads} + : (muted && )}