2019-03-26 18:19:55 +11:00
|
|
|
import QtQuick 2.7
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
import QtQuick.Layouts 1.4
|
2019-03-26 20:52:43 +11:00
|
|
|
import "../base" as Base
|
2019-03-26 18:19:55 +11:00
|
|
|
|
|
|
|
ListView {
|
|
|
|
property var user: null
|
|
|
|
|
|
|
|
property int contentHeight: 0
|
|
|
|
|
|
|
|
onCountChanged: {
|
|
|
|
var children = roomList.children
|
|
|
|
var childrenHeight = 0
|
|
|
|
|
|
|
|
for (var i = 0; i < children.length; i++) {
|
|
|
|
childrenHeight += children[i].height
|
|
|
|
}
|
|
|
|
|
|
|
|
contentHeight = childrenHeight + spacing * (children.length - 1)
|
|
|
|
}
|
|
|
|
|
|
|
|
id: "roomList"
|
|
|
|
spacing: 8
|
|
|
|
model: Backend.roomsModel[user.user_id]
|
|
|
|
delegate: RoomDelegate {}
|
|
|
|
}
|