diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index ff25a4e35a..c681f5105d 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -21,8 +21,6 @@ var sdk = require('../../index'); var MatrixClientPeg = require('../../MatrixClientPeg') -const MILLIS_IN_DAY = 86400000; - /* (almost) stateless UI component which builds the event tiles in the room timeline. */ module.exports = React.createClass({ @@ -477,7 +475,9 @@ module.exports = React.createClass({ // here. return !this.props.suppressFirstDateSeparator; } - return Math.floor(prevEvent.getTs() / MILLIS_IN_DAY) !== Math.floor(nextEventTs / MILLIS_IN_DAY); + + return (new Date(prevEvent.getTs()).toDateString() + !== new Date(nextEventTs).toDateString()); }, // get a list of read receipts that should be shown next to this event