Improved ListModel and ListItem
- New ListItem implemented using a metaclass, which makes defining new ListItem subclasses much cleaner and shorter - ListModel functions taking an index now accept either an int (list index) or str (value of a main key) - getWhere() gone, simply use get(a_main_key_value) now - updateOrAppendWhere replaced by update()/upsert()
This commit is contained in:
@@ -8,7 +8,7 @@ HColumnLayout {
|
||||
property string roomId: ""
|
||||
|
||||
readonly property var roomInfo:
|
||||
Backend.models.rooms.get(userId).getWhere("roomId", roomId)
|
||||
Backend.models.rooms.get(userId).get(roomId)
|
||||
|
||||
property bool canLoadPastEvents: true
|
||||
|
||||
@@ -17,7 +17,7 @@ HColumnLayout {
|
||||
|
||||
RoomHeader {
|
||||
displayName: roomInfo.displayName
|
||||
topic: roomInfo.topic
|
||||
topic: roomInfo.topic || ""
|
||||
}
|
||||
|
||||
RoomEventList {}
|
||||
|
Reference in New Issue
Block a user