From 5380a86b5c51f5fa31c578c148a257a4a9b038f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Fri, 3 Mar 2023 14:49:05 -0500
Subject: [PATCH] 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
---
 .../mainview/components/MessageListView.qml   | 21 -------------------
 1 file changed, 21 deletions(-)

diff --git a/src/app/mainview/components/MessageListView.qml b/src/app/mainview/components/MessageListView.qml
index 17f476bd5..1d45a5607 100644
--- a/src/app/mainview/components/MessageListView.qml
+++ b/src/app/mainview/components/MessageListView.qml
@@ -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
-- 
GitLab