| 
									
										
										
										
											2019-05-12 13:17:42 -04:00
										 |  |  | import QtQuick 2.7 | 
					
						
							|  |  |  | import QtQuick.Layouts 1.3 | 
					
						
							|  |  |  | import "../../Base" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-12 21:36:08 -04:00
										 |  |  | HColumnLayout { | 
					
						
							| 
									
										
										
										
											2019-05-17 15:46:49 -04:00
										 |  |  |     property bool collapsed: false | 
					
						
							|  |  |  |     property int normalSpacing: collapsed ? 0 : 8 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-06 17:42:04 -04:00
										 |  |  |     Behavior on normalSpacing { HNumberAnimation {} } | 
					
						
							| 
									
										
										
										
											2019-05-12 13:17:42 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-13 13:15:03 -04:00
										 |  |  |     HListView { | 
					
						
							| 
									
										
										
										
											2019-05-12 13:17:42 -04:00
										 |  |  |         id: memberList | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-16 15:39:44 -04:00
										 |  |  |         spacing: normalSpacing | 
					
						
							| 
									
										
										
										
											2019-05-17 15:46:49 -04:00
										 |  |  |         topMargin: normalSpacing | 
					
						
							|  |  |  |         bottomMargin: normalSpacing | 
					
						
							|  |  |  |         Layout.leftMargin: normalSpacing | 
					
						
							|  |  |  |         Layout.rightMargin: normalSpacing | 
					
						
							| 
									
										
										
										
											2019-05-12 13:17:42 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-15 15:59:43 -04:00
										 |  |  |         model: chatPage.roomInfo.sortedMembers | 
					
						
							| 
									
										
										
										
											2019-05-12 13:17:42 -04:00
										 |  |  |         delegate: MemberDelegate {} | 
					
						
							| 
									
										
										
										
											2019-05-12 21:36:08 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |         Layout.fillWidth: true | 
					
						
							|  |  |  |         Layout.fillHeight: true | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-12 13:17:42 -04:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2019-05-16 15:39:44 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  |     HTextField { | 
					
						
							|  |  |  |         id: filterField | 
					
						
							|  |  |  |         placeholderText: qsTr("Filter members") | 
					
						
							| 
									
										
										
										
											2019-07-06 17:50:55 -04:00
										 |  |  |         backgroundColor: theme.sidePane.filterRooms.background | 
					
						
							| 
									
										
										
										
											2019-05-16 15:39:44 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-16 15:47:14 -04: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.
 | 
					
						
							|  |  |  |         Component.onCompleted: | 
					
						
							|  |  |  |             text = Backend.clients.get(chatPage.userId).getMemberFilter( | 
					
						
							|  |  |  |                 chatPage.category, chatPage.roomId | 
					
						
							|  |  |  |             ) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-05-16 15:39:44 -04:00
										 |  |  |         onTextChanged: Backend.clients.get(chatPage.userId).setMemberFilter( | 
					
						
							|  |  |  |             chatPage.category, chatPage.roomId, text | 
					
						
							|  |  |  |         ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         Layout.fillWidth: true | 
					
						
							| 
									
										
										
										
											2019-07-06 17:50:55 -04:00
										 |  |  |         Layout.preferredHeight: theme.bottomElementsHeight | 
					
						
							| 
									
										
										
										
											2019-05-16 15:39:44 -04:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2019-05-12 13:17:42 -04:00
										 |  |  | } |