2019-05-13 03:17:42 +10:00
|
|
|
import QtQuick 2.7
|
|
|
|
import QtQuick.Layouts 1.3
|
|
|
|
import "../../Base"
|
|
|
|
|
2019-05-13 11:36:08 +10:00
|
|
|
HColumnLayout {
|
2019-05-18 05:46:49 +10:00
|
|
|
property bool collapsed: false
|
|
|
|
property int normalSpacing: collapsed ? 0 : 8
|
|
|
|
|
2019-07-07 07:42:04 +10:00
|
|
|
Behavior on normalSpacing { HNumberAnimation {} }
|
2019-05-13 03:17:42 +10:00
|
|
|
|
2019-05-14 03:15:03 +10:00
|
|
|
HListView {
|
2019-05-13 03:17:42 +10:00
|
|
|
id: memberList
|
|
|
|
|
2019-05-17 05:39:44 +10:00
|
|
|
spacing: normalSpacing
|
2019-05-18 05:46:49 +10:00
|
|
|
topMargin: normalSpacing
|
|
|
|
bottomMargin: normalSpacing
|
|
|
|
Layout.leftMargin: normalSpacing
|
|
|
|
Layout.rightMargin: normalSpacing
|
2019-05-13 03:17:42 +10:00
|
|
|
|
2019-07-07 19:15:18 +10:00
|
|
|
model: chatPage.roomInfo.members
|
2019-05-13 03:17:42 +10:00
|
|
|
delegate: MemberDelegate {}
|
2019-05-13 11:36:08 +10:00
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
|
2019-05-13 03:17:42 +10:00
|
|
|
}
|
2019-05-17 05:39:44 +10:00
|
|
|
|
|
|
|
HTextField {
|
|
|
|
id: filterField
|
|
|
|
placeholderText: qsTr("Filter members")
|
2019-07-07 07:50:55 +10:00
|
|
|
backgroundColor: theme.sidePane.filterRooms.background
|
2019-05-17 05:39:44 +10:00
|
|
|
|
2019-05-17 05:47:14 +10:00
|
|
|
// Without this, if the user types in the field, changes of room, then
|
|
|
|
// comes back, the field will be empty but the filter still applied.
|
2019-07-07 19:15:18 +10:00
|
|
|
//Component.onCompleted:
|
|
|
|
//text = Backend.clients.get(chatPage.userId).getMemberFilter(
|
|
|
|
//chatPage.category, chatPage.roomId
|
|
|
|
//)
|
|
|
|
|
|
|
|
//onTextChanged: Backend.clients.get(chatPage.userId).setMemberFilter(
|
|
|
|
//chatPage.category, chatPage.roomId, text
|
|
|
|
//)
|
2019-05-17 05:39:44 +10:00
|
|
|
|
|
|
|
Layout.fillWidth: true
|
2019-07-07 07:50:55 +10:00
|
|
|
Layout.preferredHeight: theme.bottomElementsHeight
|
2019-05-17 05:39:44 +10:00
|
|
|
}
|
2019-05-13 03:17:42 +10:00
|
|
|
}
|