mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-04 14:55:43 +02:00
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
This commit is contained in:
parent
266aae543d
commit
5380a86b5c
1 changed files with 0 additions and 21 deletions
|
@ -179,27 +179,6 @@ JamiListView {
|
||||||
boundsBehavior: Flickable.StopAtBounds
|
boundsBehavior: Flickable.StopAtBounds
|
||||||
currentIndex: -1
|
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
|
model: MessagesAdapter.messageListModel
|
||||||
delegate: DelegateChooser {
|
delegate: DelegateChooser {
|
||||||
id: delegateChooser
|
id: delegateChooser
|
||||||
|
|
Loading…
Add table
Reference in a new issue