fix(@desktop/chat): incorrect timestamp evaluation
This commit is contained in:
parent
0455bcdcf1
commit
79db861d2f
|
@ -305,10 +305,11 @@ Item {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
clip: true
|
clip: true
|
||||||
|
currentIndex: chatsModel.messageView.getMessageListIndex(chatsModel.channelView.activeChannelIndex)
|
||||||
Repeater {
|
Repeater {
|
||||||
model: chatsModel.messageView
|
model: chatsModel.messageView
|
||||||
Loader {
|
Loader {
|
||||||
active: false
|
active: stackLayoutChatMessages.currentIndex === index
|
||||||
sourceComponent: ChatMessages {
|
sourceComponent: ChatMessages {
|
||||||
messageList: model.messages
|
messageList: model.messages
|
||||||
currentTime: chatColumnLayout.currentTime
|
currentTime: chatColumnLayout.currentTime
|
||||||
|
@ -318,16 +319,6 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: chatsModel.channelView
|
|
||||||
onActiveChannelChanged: {
|
|
||||||
stackLayoutChatMessages.currentIndex = chatsModel.messageView.getMessageListIndex(chatsModel.channelView.activeChannelIndex)
|
|
||||||
if(stackLayoutChatMessages.currentIndex > -1 && !stackLayoutChatMessages.children[stackLayoutChatMessages.currentIndex].active){
|
|
||||||
stackLayoutChatMessages.children[stackLayoutChatMessages.currentIndex].active = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
|
|
|
@ -329,7 +329,7 @@ SplitView {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
nextMessageIndex: {
|
nextMessageIndex: {
|
||||||
if (msgDelegate.DelegateModel.itemsIndex <= 1) {
|
if (msgDelegate.DelegateModel.itemsIndex < 1) {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
return messageListDelegate.items.get(msgDelegate.DelegateModel.itemsIndex - 1).model.index
|
return messageListDelegate.items.get(msgDelegate.DelegateModel.itemsIndex - 1).model.index
|
||||||
|
|
Loading…
Reference in New Issue