mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-11 14:54:48 +00:00
fix(@desktop/chat): navigating from Chats to Timeline shows wrong messages
This commit is contained in:
parent
0eab4009ba
commit
3bb5be8685
@ -144,6 +144,7 @@ QtObject:
|
|||||||
|
|
||||||
proc activeChannelChanged*(self: ChatsView) {.slot.} =
|
proc activeChannelChanged*(self: ChatsView) {.slot.} =
|
||||||
self.channelView.activeChannelChanged()
|
self.channelView.activeChannelChanged()
|
||||||
|
self.messageView.activeChannelChanged()
|
||||||
self.triggerActiveChannelChange()
|
self.triggerActiveChannelChange()
|
||||||
|
|
||||||
proc getMessageView*(self: ChatsView): QVariant {.slot.} = newQVariant(self.messageView)
|
proc getMessageView*(self: ChatsView): QVariant {.slot.} = newQVariant(self.messageView)
|
||||||
@ -413,9 +414,6 @@ QtObject:
|
|||||||
self.channelView.setActiveChannel(channel)
|
self.channelView.setActiveChannel(channel)
|
||||||
self.messageView.activeChannelChanged()
|
self.messageView.activeChannelChanged()
|
||||||
|
|
||||||
# proc activeChannelChanged*(self: ChatsView) =
|
|
||||||
# self.channelView.activeChannelChanged()
|
|
||||||
|
|
||||||
proc requestMoreMessages*(self: ChatsView, fetchRange: int) {.slot.} =
|
proc requestMoreMessages*(self: ChatsView, fetchRange: int) {.slot.} =
|
||||||
self.messageView.loadingMessages = true
|
self.messageView.loadingMessages = true
|
||||||
self.messageView.loadingMessagesChanged(true)
|
self.messageView.loadingMessagesChanged(true)
|
||||||
|
@ -118,16 +118,16 @@ SplitView {
|
|||||||
radius: 16
|
radius: 16
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.newMessages = 0
|
svRoot.newMessages = 0
|
||||||
scrollDownButton.visible = false
|
scrollDownButton.visible = false
|
||||||
chatLogView.scrollToBottom(true)
|
chatLogView.scrollToBottom(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
id: nbMessages
|
id: nbMessages
|
||||||
visible: root.newMessages > 0
|
visible: svRoot.newMessages > 0
|
||||||
width: visible ? implicitWidth : 0
|
width: visible ? implicitWidth : 0
|
||||||
text: root.newMessages
|
text: svRoot.newMessages
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
color: Style.current.pillButtonTextColor
|
color: Style.current.pillButtonTextColor
|
||||||
@ -194,7 +194,7 @@ SplitView {
|
|||||||
|
|
||||||
onNewMessagePushed: {
|
onNewMessagePushed: {
|
||||||
if (!chatLogView.scrollToBottom()) {
|
if (!chatLogView.scrollToBottom()) {
|
||||||
root.newMessages++
|
svRoot.newMessages++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ Item {
|
|||||||
visible: {
|
visible: {
|
||||||
return gapNowAndOldest < maxGapInSeconds
|
return gapNowAndOldest < maxGapInSeconds
|
||||||
&& gapNowAndJoined > maxGapInSeconds
|
&& gapNowAndJoined > maxGapInSeconds
|
||||||
&& (chatsModel.activeChannel.chatType !== Constants.chatTypePrivateGroupChat || chatsModel.activeChannel.isMember)
|
&& (chatsModel.channelView.activeChannel.chatType !== Constants.chatTypePrivateGroupChat || chatsModel.channelView.activeChannel.isMember)
|
||||||
}
|
}
|
||||||
height: childrenRect.height + Style.current.smallPadding * 2
|
height: childrenRect.height + Style.current.smallPadding * 2
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -121,7 +121,7 @@ ScrollView {
|
|||||||
function(left, right) { return left.clock > right.clock }
|
function(left, right) { return left.clock > right.clock }
|
||||||
]
|
]
|
||||||
|
|
||||||
model: chatsModel.messageList
|
model: chatsModel.messageView.messageList
|
||||||
delegate: Message {
|
delegate: Message {
|
||||||
id: msgDelegate
|
id: msgDelegate
|
||||||
fromAuthor: model.fromAuthor
|
fromAuthor: model.fromAuthor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user