diff --git a/src/client/state/RoomTimeline.js b/src/client/state/RoomTimeline.js index ea7376a..b6800ab 100644 --- a/src/client/state/RoomTimeline.js +++ b/src/client/state/RoomTimeline.js @@ -90,6 +90,7 @@ class RoomTimeline extends EventEmitter { } canPaginateBackward() { + if (this.timeline[0].getType() === 'm.room.create') return false; const tm = getFirstLinkedTimeline(this.activeTimeline); return tm.getPaginationToken('b') !== null; } diff --git a/src/util/common.js b/src/util/common.js index 8932aa6..d7f4c36 100644 --- a/src/util/common.js +++ b/src/util/common.js @@ -14,11 +14,7 @@ export function diffMinutes(dt2, dt1) { } export function isInSameDay(dt2, dt1) { - return ( - dt2.getDay() === dt1.getDay() - && dt2.getMonth() === dt1.getMonth() - && dt2.getYear() === dt1.getYear() - ); + return (dt2.setHours(0, 0, 0, 0) === dt1.setHours(0, 0, 0, 0)); } export function getEventCords(ev) {