mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-22 20:40:18 +00:00
chore: improve channel switch perf
Having the Timeline component loaded eagerly made switching between channels rather slow because it always tries to read the current message list from the chats model. This commit changes the layout so that the timeline layout container is only loaded conditionally when indeed activated.
This commit is contained in:
parent
0f1b46097e
commit
dd195431a5
@ -296,6 +296,8 @@ RowLayout {
|
||||
browserLayoutContainer.active = true;
|
||||
}
|
||||
|
||||
timelineLayoutContainer.active = this.children[currentIndex] == timelineLayoutContainer
|
||||
|
||||
if(this.children[currentIndex] === chatLayoutContainer){
|
||||
chatLayoutContainer.chatColumn.chatMessages.chatLogView.scrollToBottom(true);
|
||||
}
|
||||
@ -339,8 +341,11 @@ RowLayout {
|
||||
property var _web3Provider: web3Provider
|
||||
}
|
||||
|
||||
TimelineLayout {
|
||||
Loader {
|
||||
id: timelineLayoutContainer
|
||||
sourceComponent: TimelineLayout {}
|
||||
onLoaded: timelineLayoutContainer.item.onActivated()
|
||||
active: false
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Layout.fillHeight: true
|
||||
|
Loading…
x
Reference in New Issue
Block a user