fix qmail notification

This commit is contained in:
PhilReact 2025-03-10 18:12:58 +02:00
parent 8c8c6e512b
commit eb2d2e0508

View File

@ -107,7 +107,7 @@ export const QMailMessages = ({userName, userAddress}) => {
let unread = false let unread = false
mails.forEach((mail)=> { mails.forEach((mail)=> {
if(lastEnteredTimestamp && isLessThanOneWeekOld(mail?.created)){ if(!lastEnteredTimestamp && isLessThanOneWeekOld(mail?.created) || (lastEnteredTimestamp && isLessThanOneWeekOld(mail?.created) && lastEnteredTimestamp < mail?.created)){
unread = true unread = true
} }
}) })
@ -144,13 +144,13 @@ export const QMailMessages = ({userName, userAddress}) => {
Latest Q-Mails Latest Q-Mails
</Typography> </Typography>
<MarkEmailUnreadIcon sx={{ <MarkEmailUnreadIcon sx={{
color: anyUnread ? '--unread' : 'white' color: anyUnread ? 'var(--unread)' : 'white'
}}/> }}/>
{isExpanded ? <ExpandLessIcon sx={{ {isExpanded ? <ExpandLessIcon sx={{
marginLeft: 'auto' marginLeft: 'auto'
}} /> : ( }} /> : (
<ExpandMoreIcon sx={{ <ExpandMoreIcon sx={{
color: anyUnread ? '--unread' : 'white', color: anyUnread ? 'var(--unread)' : 'white',
marginLeft: 'auto' marginLeft: 'auto'
}} /> }} />
)} )}