Skip to content

Commit

Permalink
fix(MessgaesList): update date separator overnight
Browse files Browse the repository at this point in the history
Signed-off-by: DorraJaouad <[email protected]>

[skip ci]
  • Loading branch information
DorraJaouad authored and backportbot[bot] committed Oct 1, 2024
1 parent a71b5d8 commit 3978dc0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/MessagesList/MessagesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ export default {
}
if (!this.dateSeparatorLabels[dateTimestamp]) {
this.dateSeparatorLabels[dateTimestamp] = this.generateDateSeparator(dateTimestamp)
this.$set(this.dateSeparatorLabels, dateTimestamp, this.generateDateSeparator(dateTimestamp))
}
if (!groupsByDate[dateTimestamp]) {
Expand Down Expand Up @@ -1230,6 +1230,10 @@ export default {
// setTimeout is needed here for Safari to correctly remove the unread marker
setTimeout(() => {
this.refreshReadMarkerPosition()
// Regenerate relative date separators
Object.keys(this.dateSeparatorLabels).forEach(dateTimestamp => {
this.$set(this.dateSeparatorLabels, dateTimestamp, this.generateDateSeparator(dateTimestamp))
})
}, 2)
},
Expand Down

0 comments on commit 3978dc0

Please sign in to comment.