diff --git a/src/app/chat/view.nim b/src/app/chat/view.nim index 5722b6db47..75f862246a 100644 --- a/src/app/chat/view.nim +++ b/src/app/chat/view.nim @@ -144,6 +144,7 @@ QtObject: proc activeChannelChanged*(self: ChatsView) {.slot.} = self.channelView.activeChannelChanged() + self.messageView.activeChannelChanged() self.triggerActiveChannelChange() proc getMessageView*(self: ChatsView): QVariant {.slot.} = newQVariant(self.messageView) @@ -413,9 +414,6 @@ QtObject: self.channelView.setActiveChannel(channel) self.messageView.activeChannelChanged() - # proc activeChannelChanged*(self: ChatsView) = - # self.channelView.activeChannelChanged() - proc requestMoreMessages*(self: ChatsView, fetchRange: int) {.slot.} = self.messageView.loadingMessages = true self.messageView.loadingMessagesChanged(true) diff --git a/ui/app/AppLayouts/Chat/ChatColumn/ChatMessages.qml b/ui/app/AppLayouts/Chat/ChatColumn/ChatMessages.qml index 98d09ef2a1..2900cf8f0e 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/ChatMessages.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/ChatMessages.qml @@ -118,16 +118,16 @@ SplitView { radius: 16 } onClicked: { - root.newMessages = 0 + svRoot.newMessages = 0 scrollDownButton.visible = false chatLogView.scrollToBottom(true) } StyledText { id: nbMessages - visible: root.newMessages > 0 + visible: svRoot.newMessages > 0 width: visible ? implicitWidth : 0 - text: root.newMessages + text: svRoot.newMessages anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left color: Style.current.pillButtonTextColor @@ -194,7 +194,7 @@ SplitView { onNewMessagePushed: { if (!chatLogView.scrollToBottom()) { - root.newMessages++ + svRoot.newMessages++ } } diff --git a/ui/app/AppLayouts/Chat/ChatColumn/Message.qml b/ui/app/AppLayouts/Chat/ChatColumn/Message.qml index 19ce3f1e28..ac2aba0571 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/Message.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/Message.qml @@ -305,7 +305,7 @@ Item { visible: { return gapNowAndOldest < 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 anchors.left: parent.left diff --git a/ui/app/AppLayouts/Timeline/TimelineLayout.qml b/ui/app/AppLayouts/Timeline/TimelineLayout.qml index d026830f36..4b9360bb9d 100644 --- a/ui/app/AppLayouts/Timeline/TimelineLayout.qml +++ b/ui/app/AppLayouts/Timeline/TimelineLayout.qml @@ -121,7 +121,7 @@ ScrollView { function(left, right) { return left.clock > right.clock } ] - model: chatsModel.messageList + model: chatsModel.messageView.messageList delegate: Message { id: msgDelegate fromAuthor: model.fromAuthor