mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-21 16:05:26 +02:00
MessageListView: wrong new message sequence
GitLab: #983 Change-Id: Ida7b6e84768aac69113af8d29b96a4627ae6c9f4
This commit is contained in:
parent
b568484453
commit
dfd1f6c78c
1 changed files with 12 additions and 4 deletions
|
@ -63,6 +63,7 @@ JamiListView {
|
|||
var pItemIndex = itemIndex - 1
|
||||
var nItem = root.itemAtIndex(itemIndex + 1)
|
||||
var nItemIndex = itemIndex + 1
|
||||
|
||||
// middle insertion
|
||||
if (pItem && nItem) {
|
||||
computeTimestampVisibility(item, itemIndex, nItem, nItemIndex)
|
||||
|
@ -80,10 +81,17 @@ JamiListView {
|
|||
}
|
||||
// index 0 insertion = new message
|
||||
if (itemIndex === 0) {
|
||||
if (!nItem && !CurrentConversation.allMessagesLoaded)
|
||||
Qt.callLater(computeChatview, item, itemIndex)
|
||||
else
|
||||
computeSequencing( null, item, root.itemAtIndex(itemIndex + 1))
|
||||
// Compute the timestamp visibility when a new message is received/sent.
|
||||
// This needs to be done in a delayed fashion because the new message is inserted
|
||||
// at the top of the list and the list is not yet updated.
|
||||
Qt.callLater(() => {
|
||||
var fItem = root.itemAtIndex(1)
|
||||
if (fItem) {
|
||||
computeTimestampVisibility(item, 0, fItem, 1)
|
||||
computeSequencing(null, item, fItem)
|
||||
computeSequencing(item, fItem, root.itemAtIndex(2))
|
||||
}
|
||||
})
|
||||
}
|
||||
// top element
|
||||
if(itemIndex === root.count - 1 && CurrentConversation.allMessagesLoaded) {
|
||||
|
|
Loading…
Add table
Reference in a new issue