Skip to content
Snippets Groups Projects
Commit 5380a86b authored by Sébastien Blin's avatar Sébastien Blin
Browse files

messagelistview: fix sequencing on edition

No need to re-compute sequencing as deleted messages are just
replaced by "Deleted message" and edition should not change any
sequencing

Change-Id: I03e210ac88b919b76b409583de2221406e468f50
GitLab: #991
parent 266aae54
No related branches found
No related tags found
No related merge requests found
......@@ -179,27 +179,6 @@ JamiListView {
boundsBehavior: Flickable.StopAtBounds
currentIndex: -1
// This connection to dataChanged resolves the styling for
// messages before and after an erased message.
Connections {
target: MessagesAdapter.messageListModel
function onDataChanged(tl, br, roles) {
if (!(roles.includes(MessageList.Body) &&
roles.includes(MessageList.PreviousBodies))) {
return
}
const staleIndex = tl.row
var pItem = root.itemAtIndex(staleIndex - 1)
var nItem = root.itemAtIndex(staleIndex + 1)
var ppItem = root.itemAtIndex(staleIndex + 2)
var nnItem = root.itemAtIndex(staleIndex + 2)
computeTimestampVisibility(ppItem, staleIndex - 2, pItem, staleIndex - 1)
computeSequencing(ppItem, pItem, nItem)
computeTimestampVisibility(nItem, staleIndex + 1, nnItem, staleIndex + 2)
computeSequencing(pItem, nItem, nnItem)
}
}
model: MessagesAdapter.messageListModel
delegate: DelegateChooser {
id: delegateChooser
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment