fix: scroll to bottom when switching back from any module to chat

This commit is contained in:
Richard Ramos 2020-11-19 14:30:09 -04:00 committed by Iuri Matias
parent 417194e7b4
commit 8890805a14
4 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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()
} }

View File

@ -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 {