Prefetch messages when adding room && wire setting.

This commit is contained in:
Black Hat
2018-07-20 13:50:25 +08:00
parent 6f6a7da414
commit c330bb4ff5
5 changed files with 28 additions and 8 deletions

View File

@@ -92,8 +92,6 @@ Item {
model: MessageEventModel{
id: messageEventModel
room: currentRoom
onRoomChanged: room.timelineSize === 0 ? room.getPreviousContent(50) : {}
}
delegate: MessageDelegate {}

View File

@@ -12,7 +12,7 @@ import "qrc:/qml/component"
Item {
property alias listModel: roomListProxyModel.sourceModel
property int currentIndex: roomListProxyModel.mapToSource(listView.currentIndex)
readonly property bool mini: settingPage.miniMode // Used as an indicator of whether the listform should be displayed as "Mini mode".
readonly property bool mini: setting.miniMode // Used as an indicator of whether the listform should be displayed as "Mini mode".
ColumnLayout {
anchors.fill: parent