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 {
|
2019-04-12 18:33:09 +10:00
|
|
|
property var for_user_id: null
|
2019-03-26 18:19:55 +11:00
|
|
|
|
2019-04-13 22:59:10 +10:00
|
|
|
property int childrenHeight: 36
|
2019-03-26 18:19:55 +11:00
|
|
|
property int contentHeight: 0
|
|
|
|
|
|
|
|
onCountChanged: {
|
2019-04-13 22:59:10 +10:00
|
|
|
contentHeight = childrenHeight * model.count +
|
|
|
|
spacing * (model.count - 1)
|
2019-03-26 18:19:55 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
id: "roomList"
|
|
|
|
spacing: 8
|
2019-04-13 03:18:46 +10:00
|
|
|
model: Backend.models.rooms.get(for_user_id)
|
2019-03-26 18:19:55 +11:00
|
|
|
delegate: RoomDelegate {}
|
|
|
|
}
|