Fix daybreak not showing before RoomCreateEvent
This commit is contained in:
parent
10a53d7afb
commit
f0612c2a51
1
TODO.md
1
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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user