mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-29 06:08:48 +03:00
Simplify room details access
This removes the redundant room name property
This commit is contained in:
parent
908629bec0
commit
59a2630be7
3 changed files with 4 additions and 6 deletions
|
@ -56,7 +56,6 @@ ApplicationWindow {
|
|||
id: inviteeEntry
|
||||
|
||||
placeholderText: qsTr("@joe:matrix.org", "Example user id. The name 'joe' can be localized however you want.")
|
||||
backgroundColor: colors.window
|
||||
Layout.fillWidth: true
|
||||
onAccepted: if (text !== "") addInvite()
|
||||
Component.onCompleted: forceActiveFocus()
|
||||
|
|
|
@ -7,10 +7,9 @@ import im.nheko 1.0
|
|||
ApplicationWindow {
|
||||
id: roomMembersRoot
|
||||
|
||||
property string roomName: Rooms.currentRoom.roomName
|
||||
property MemberList members
|
||||
|
||||
title: qsTr("Members of ") + roomName
|
||||
title: qsTr("Members of ") + members.roomName
|
||||
x: MainWindow.x + (MainWindow.width / 2) - (width / 2)
|
||||
y: MainWindow.y + (MainWindow.height / 2) - (height / 2)
|
||||
height: 650
|
||||
|
@ -40,7 +39,7 @@ ApplicationWindow {
|
|||
|
||||
Label {
|
||||
font.pixelSize: 24
|
||||
text: members.memberCount + (members.memberCount === 1 ? qsTr(" person in ") : qsTr(" people in ")) + roomName
|
||||
text: members.memberCount + (members.memberCount === 1 ? qsTr(" person in ") : qsTr(" people in ")) + members.roomName
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
}
|
||||
|
||||
|
|
|
@ -111,12 +111,12 @@ Rectangle {
|
|||
Platform.MenuItem {
|
||||
visible: room ? room.permissions.canInvite() : false
|
||||
text: qsTr("Invite users")
|
||||
onTriggered: TimelineManager.timeline.openInviteUsers()
|
||||
onTriggered: Rooms.currentRoom.openInviteUsers()
|
||||
}
|
||||
|
||||
Platform.MenuItem {
|
||||
text: qsTr("Members")
|
||||
onTriggered: Rooms.currentRoom.openRoomMembers(room.roomId())
|
||||
onTriggered: Rooms.currentRoom.openRoomMembers()
|
||||
}
|
||||
|
||||
Platform.MenuItem {
|
||||
|
|
Loading…
Reference in a new issue