Reintroduce RoomSidePane with members list
This commit is contained in:
parent
735707bade
commit
ea600a1450
|
@ -112,6 +112,7 @@ class MatrixClient(nio.AsyncClient):
|
||||||
async def request_user_update_event(self, user_id: str) -> None:
|
async def request_user_update_event(self, user_id: str) -> None:
|
||||||
if user_id in self.backend.pending_profile_requests:
|
if user_id in self.backend.pending_profile_requests:
|
||||||
return
|
return
|
||||||
|
print(user_id)
|
||||||
self.backend.pending_profile_requests.add(user_id)
|
self.backend.pending_profile_requests.add(user_id)
|
||||||
|
|
||||||
response = await self.get_profile(user_id)
|
response = await self.get_profile(user_id)
|
||||||
|
|
|
@ -68,70 +68,70 @@ HColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RoomSidePane {
|
RoomSidePane {
|
||||||
//id: roomSidePane
|
id: roomSidePane
|
||||||
|
|
||||||
//activeView: roomHeader.activeButton
|
activeView: roomHeader.activeButton
|
||||||
//property int oldWidth: width
|
property int oldWidth: width
|
||||||
//onActiveViewChanged:
|
onActiveViewChanged:
|
||||||
//activeView ? restoreAnimation.start() : hideAnimation.start()
|
activeView ? restoreAnimation.start() : hideAnimation.start()
|
||||||
|
|
||||||
//HNumberAnimation {
|
HNumberAnimation {
|
||||||
//id: hideAnimation
|
id: hideAnimation
|
||||||
//target: roomSidePane
|
target: roomSidePane
|
||||||
//properties: "width"
|
properties: "width"
|
||||||
//from: target.width
|
from: target.width
|
||||||
//to: 0
|
to: 0
|
||||||
|
|
||||||
//onStarted: {
|
onStarted: {
|
||||||
//target.oldWidth = target.width
|
target.oldWidth = target.width
|
||||||
//target.Layout.minimumWidth = 0
|
target.Layout.minimumWidth = 0
|
||||||
//}
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
//HNumberAnimation {
|
HNumberAnimation {
|
||||||
//id: restoreAnimation
|
id: restoreAnimation
|
||||||
//target: roomSidePane
|
target: roomSidePane
|
||||||
//properties: "width"
|
properties: "width"
|
||||||
//from: 0
|
from: 0
|
||||||
//to: target.oldWidth
|
to: target.oldWidth
|
||||||
|
|
||||||
//onStopped: target.Layout.minimumWidth = Qt.binding(
|
onStopped: target.Layout.minimumWidth = Qt.binding(
|
||||||
//function() { return theme.avatar.size }
|
function() { return theme.avatar.size }
|
||||||
//)
|
)
|
||||||
//}
|
}
|
||||||
|
|
||||||
//collapsed: width < theme.avatar.size + 8
|
collapsed: width < theme.avatar.size + 8
|
||||||
|
|
||||||
//property bool wasSnapped: false
|
property bool wasSnapped: false
|
||||||
//property int referenceWidth: roomHeader.buttonsWidth
|
property int referenceWidth: roomHeader.buttonsWidth
|
||||||
//onReferenceWidthChanged: {
|
onReferenceWidthChanged: {
|
||||||
//if (chatSplitView.canAutoSize || wasSnapped) {
|
if (chatSplitView.canAutoSize || wasSnapped) {
|
||||||
//if (wasSnapped) { chatSplitView.canAutoSize = true }
|
if (wasSnapped) { chatSplitView.canAutoSize = true }
|
||||||
//width = referenceWidth
|
width = referenceWidth
|
||||||
//}
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
//property int currentWidth: width
|
property int currentWidth: width
|
||||||
//onCurrentWidthChanged: {
|
onCurrentWidthChanged: {
|
||||||
//if (referenceWidth != width &&
|
if (referenceWidth != width &&
|
||||||
//referenceWidth - 15 < width &&
|
referenceWidth - 15 < width &&
|
||||||
//width < referenceWidth + 15)
|
width < referenceWidth + 15)
|
||||||
//{
|
{
|
||||||
//currentWidth = referenceWidth
|
currentWidth = referenceWidth
|
||||||
//width = referenceWidth
|
width = referenceWidth
|
||||||
//wasSnapped = true
|
wasSnapped = true
|
||||||
//currentWidth = Qt.binding(
|
currentWidth = Qt.binding(
|
||||||
//function() { return roomSidePane.width }
|
function() { return roomSidePane.width }
|
||||||
//)
|
)
|
||||||
//} else {
|
} else {
|
||||||
//wasSnapped = false
|
wasSnapped = false
|
||||||
//}
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
//width: referenceWidth // Initial width
|
width: referenceWidth // Initial width
|
||||||
//Layout.minimumWidth: theme.avatar.size
|
Layout.minimumWidth: theme.avatar.size
|
||||||
//Layout.maximumWidth: parent.width
|
Layout.maximumWidth: parent.width
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ MouseArea {
|
||||||
width: memberList.width
|
width: memberList.width
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
|
|
||||||
property var memberInfo: Backend.users.get(model.userId)
|
property var memberInfo: users.getUser(model.userId)
|
||||||
|
|
||||||
HRowLayout {
|
HRowLayout {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
@ -15,7 +15,7 @@ MouseArea {
|
||||||
|
|
||||||
HUserAvatar {
|
HUserAvatar {
|
||||||
id: avatar
|
id: avatar
|
||||||
userId: memberInfo.userId
|
userId: model.userId
|
||||||
}
|
}
|
||||||
|
|
||||||
HColumnLayout {
|
HColumnLayout {
|
||||||
|
|
|
@ -17,7 +17,7 @@ HColumnLayout {
|
||||||
Layout.leftMargin: normalSpacing
|
Layout.leftMargin: normalSpacing
|
||||||
Layout.rightMargin: normalSpacing
|
Layout.rightMargin: normalSpacing
|
||||||
|
|
||||||
model: chatPage.roomInfo.sortedMembers
|
model: chatPage.roomInfo.members
|
||||||
delegate: MemberDelegate {}
|
delegate: MemberDelegate {}
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -32,14 +32,14 @@ HColumnLayout {
|
||||||
|
|
||||||
// Without this, if the user types in the field, changes of room, then
|
// 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.
|
// comes back, the field will be empty but the filter still applied.
|
||||||
Component.onCompleted:
|
//Component.onCompleted:
|
||||||
text = Backend.clients.get(chatPage.userId).getMemberFilter(
|
//text = Backend.clients.get(chatPage.userId).getMemberFilter(
|
||||||
chatPage.category, chatPage.roomId
|
//chatPage.category, chatPage.roomId
|
||||||
)
|
//)
|
||||||
|
|
||||||
onTextChanged: Backend.clients.get(chatPage.userId).setMemberFilter(
|
//onTextChanged: Backend.clients.get(chatPage.userId).setMemberFilter(
|
||||||
chatPage.category, chatPage.roomId, text
|
//chatPage.category, chatPage.roomId, text
|
||||||
)
|
//)
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: theme.bottomElementsHeight
|
Layout.preferredHeight: theme.bottomElementsHeight
|
||||||
|
|
Loading…
Reference in New Issue
Block a user