diff --git a/TODO.md b/TODO.md index c21f58fb..8d8f2501 100644 --- a/TODO.md +++ b/TODO.md @@ -11,7 +11,6 @@ - When qml syntax highlighting supports ES6 string interpolation, use them - Fixes - - Daybreak? - Collapsing last account with shortcut when focused on room - Using up/down when sidepane focused - Missing hourglass when changing avatar and applying diff --git a/src/qml/Chat/Timeline/EventList.qml b/src/qml/Chat/Timeline/EventList.qml index ec5ef3af..69ec24a3 100644 --- a/src/qml/Chat/Timeline/EventList.qml +++ b/src/qml/Chat/Timeline/EventList.qml @@ -13,7 +13,7 @@ Rectangle { Component.onCompleted: shortcuts.flickTarget = eventList function canCombine(item, itemAfter) { - if (! item || ! itemAfter) { return false } + if (! item || ! itemAfter) return false return Boolean( ! canTalkBreak(item, itemAfter) && @@ -24,7 +24,7 @@ Rectangle { } function canTalkBreak(item, itemAfter) { - if (! item || ! itemAfter) { return false } + if (! item || ! itemAfter) return false return Boolean( ! canDayBreak(item, itemAfter) && @@ -33,14 +33,13 @@ Rectangle { } function canDayBreak(item, itemAfter) { - if (! item || ! itemAfter || ! item.date || ! itemAfter.date) { - return false - } + if (itemAfter && itemAfter.event_type == "RoomCreateEvent") + return true - return Boolean( - itemAfter.event_type == "RoomCreateEvent" || - item.date.getDate() != itemAfter.date.getDate() - ) + if (! item || ! itemAfter || ! item.date || ! itemAfter.date) + return false + + return item.date.getDate() != itemAfter.date.getDate() } model: HListModel {