Fix date marker not displaying sometimes

This commit is contained in:
Pavel Djundik 2020-07-08 14:43:43 +03:00
parent 9d7888814c
commit 67d9317f20
1 changed files with 8 additions and 1 deletions

View File

@ -204,7 +204,14 @@ export default {
return true;
}
return new Date(previousMessage.time).getDay() !== new Date(message.time).getDay();
const oldDate = new Date(previousMessage.time);
const newDate = new Date(message.time);
return (
oldDate.getDate() !== newDate.getDate() ||
oldDate.getMonth() !== newDate.getMonth() ||
oldDate.getFullYear() !== newDate.getFullYear()
);
},
shouldDisplayUnreadMarker(id) {
if (!unreadMarkerShown && id > this.channel.firstUnread) {