Add an option to lazy load room message at initial sync.
Reduces initial sync time. Useful if you joined a lot of rooms and have a slow homeserver.
This commit is contained in:
@@ -43,9 +43,16 @@ Item {
|
||||
|
||||
Label {
|
||||
width: parent.width
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: currentRoom && currentRoom.id ? currentRoom.id : ""
|
||||
}
|
||||
|
||||
Label {
|
||||
width: parent.width
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: currentRoom && currentRoom.canonicalAlias ? currentRoom.canonicalAlias : "No Canonical Alias"
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
|
||||
@@ -109,6 +116,12 @@ Item {
|
||||
|
||||
color: Material.theme == Material.Light ? "#eaeaea" : "#242424"
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
||||
onClicked: roomDrawer.open()
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 16
|
||||
@@ -122,12 +135,17 @@ Item {
|
||||
displayText: currentRoom ? currentRoom.displayName : ""
|
||||
}
|
||||
|
||||
Column {
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
|
||||
visible: parent.width > 80
|
||||
|
||||
Label {
|
||||
width: parent.width
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
text: currentRoom ? currentRoom.displayName : ""
|
||||
font.pointSize: 16
|
||||
elide: Text.ElideRight
|
||||
@@ -135,18 +153,14 @@ Item {
|
||||
}
|
||||
|
||||
Label {
|
||||
width: parent.width
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
text: currentRoom ? currentRoom.topic : ""
|
||||
elide: Text.ElideRight
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
}
|
||||
|
||||
ToolButton {
|
||||
contentItem: MaterialIcon { icon: "\ue5d2" }
|
||||
|
||||
onClicked: roomDrawer.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -226,5 +226,5 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
onCurrentRoomChanged: if (currentRoom && !currentRoom.timelineSize) currentRoom.getPreviousContent(20)
|
||||
onCurrentRoomChanged: setting.lazyLoad && currentRoom && !currentRoom.timelineSize ? currentRoom.getPreviousContent(20) : {}
|
||||
}
|
||||
|
||||
13
qml/form/SettingGeneralForm.qml
Normal file
13
qml/form/SettingGeneralForm.qml
Normal file
@@ -0,0 +1,13 @@
|
||||
import QtQuick 2.9
|
||||
import QtQuick.Controls 2.2
|
||||
|
||||
Page {
|
||||
property alias lazyLoad: lazyLoadSwitch.checked
|
||||
|
||||
Column {
|
||||
Switch {
|
||||
id: lazyLoadSwitch
|
||||
text: "Lazy Load at Initial Sync"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user