Keep local echo delegates at the bottom
This commit is contained in:
parent
1db406d9af
commit
dbcfad1c50
1
TODO.md
1
TODO.md
|
@ -5,6 +5,7 @@
|
|||
ideas
|
||||
(^/v) messages unread + messages still sending
|
||||
sticky avatar at top
|
||||
ability to cancel message being sent
|
||||
|
||||
nio
|
||||
fix `RoomForgetResponse.create_error`
|
||||
|
|
|
@ -75,7 +75,12 @@ function onTimelineEventReceived(
|
|||
"targetUserId": target_user_id,
|
||||
}
|
||||
|
||||
// Replace any matching local echo
|
||||
if (is_local_echo) {
|
||||
timelines.append(item)
|
||||
return
|
||||
}
|
||||
|
||||
// Replace first matching local echo
|
||||
var found = timelines.getIndices({
|
||||
"roomId": room_id,
|
||||
"senderId": sender_id,
|
||||
|
|
|
@ -12,8 +12,11 @@ HListModel {
|
|||
}
|
||||
}
|
||||
|
||||
sorters: RoleSorter {
|
||||
roleName: "date"
|
||||
sortOrder: Qt.DescendingOrder
|
||||
sorters: ExpressionSorter {
|
||||
expression: modelLeft.isLocalEcho && ! modelRight.isLocalEcho ?
|
||||
true :
|
||||
! modelLeft.isLocalEcho && modelRight.isLocalEcho ?
|
||||
false :
|
||||
modelLeft.date > modelRight.date // descending order
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user