fix: scroll to bottom when switching back from any module to chat
This commit is contained in:
parent
417194e7b4
commit
8890805a14
|
@ -12,6 +12,8 @@ import "../Wallet"
|
||||||
|
|
||||||
StackLayout {
|
StackLayout {
|
||||||
id: chatColumnLayout
|
id: chatColumnLayout
|
||||||
|
property alias chatMessages: chatMessages
|
||||||
|
|
||||||
property int chatGroupsListViewCount: 0
|
property int chatGroupsListViewCount: 0
|
||||||
|
|
||||||
property bool isReply: false
|
property bool isReply: false
|
||||||
|
|
|
@ -12,6 +12,8 @@ import "./MessageComponents"
|
||||||
ScrollView {
|
ScrollView {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
property alias chatLogView: chatLogView
|
||||||
|
|
||||||
property var messageList: MessagesData {}
|
property var messageList: MessagesData {}
|
||||||
property bool loadingMessages: false
|
property bool loadingMessages: false
|
||||||
property real scrollY: chatLogView.visibleArea.yPosition * chatLogView.contentHeight
|
property real scrollY: chatLogView.visibleArea.yPosition * chatLogView.contentHeight
|
||||||
|
|
|
@ -10,6 +10,8 @@ SplitView {
|
||||||
id: chatView
|
id: chatView
|
||||||
handle: SplitViewHandle {}
|
handle: SplitViewHandle {}
|
||||||
|
|
||||||
|
property alias chatColumn: chatColumn
|
||||||
|
|
||||||
property var onActivated: function () {
|
property var onActivated: function () {
|
||||||
chatColumn.onActivated()
|
chatColumn.onActivated()
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,6 +185,10 @@ RowLayout {
|
||||||
if(this.children[currentIndex] === browserLayoutContainer && browserLayoutContainer.active == false){
|
if(this.children[currentIndex] === browserLayoutContainer && browserLayoutContainer.active == false){
|
||||||
browserLayoutContainer.active = true;
|
browserLayoutContainer.active = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.children[currentIndex] === chatLayoutContainer){
|
||||||
|
chatLayoutContainer.chatColumn.chatMessages.chatLogView.scrollToBottom(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ChatLayout {
|
ChatLayout {
|
||||||
|
|
Loading…
Reference in New Issue