Enable lazy loading by default.
Also fixes undefined error when not logged in.
This commit is contained in:
@@ -6,15 +6,13 @@ import Matrique 0.1
|
||||
import "qrc:/qml/form"
|
||||
|
||||
Page {
|
||||
property var connection
|
||||
property alias connection: roomListModel.connection
|
||||
|
||||
id: page
|
||||
|
||||
RoomListModel {
|
||||
id: roomListModel
|
||||
|
||||
connection: page.connection
|
||||
|
||||
onRoomAdded: setting.lazyLoad ? {} : room.getPreviousContent(20)
|
||||
onNewMessage: window.active ? {} : matriqueController.showMessage(roomName, content, icon)
|
||||
}
|
||||
|
||||
@@ -240,6 +240,4 @@ Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onCurrentRoomChanged: setting.lazyLoad && currentRoom && !currentRoom.timelineSize ? currentRoom.getPreviousContent(20) : {}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ Page {
|
||||
Switch {
|
||||
id: lazyLoadSwitch
|
||||
text: "Lazy load at initial sync"
|
||||
checked: true
|
||||
}
|
||||
Switch {
|
||||
id: asyncMessageDelegateSwitch
|
||||
|
||||
@@ -73,7 +73,7 @@ ApplicationWindow {
|
||||
|
||||
parent: null
|
||||
|
||||
connection: matriqueController.isLogin ? window.connection : undefined
|
||||
connection: matriqueController.isLogin ? window.connection : null
|
||||
}
|
||||
|
||||
Setting {
|
||||
|
||||
Reference in New Issue
Block a user