Fix daybreak not showing before RoomCreateEvent

This commit is contained in:
miruka 2019-08-30 10:33:17 -04:00
parent 10a53d7afb
commit f0612c2a51
2 changed files with 8 additions and 10 deletions

View File

@ -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

View File

@ -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 {