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