Add forget to room context menu
Also show Leave only if not already left, and rename forget-room.svg to room-forget.svg
This commit is contained in:
parent
437324bd64
commit
076ff743ad
3
TODO.md
3
TODO.md
|
@ -89,8 +89,7 @@
|
||||||
- Server selection
|
- Server selection
|
||||||
- Register/Forgot? for SignIn dialog
|
- Register/Forgot? for SignIn dialog
|
||||||
- Add room
|
- Add room
|
||||||
- Leave room
|
- Leave/forget room warning popup
|
||||||
- Forget room warning popup
|
|
||||||
- Prevent using the SendBox if no permission (power levels)
|
- Prevent using the SendBox if no permission (power levels)
|
||||||
- Prevent using an alias if that user is not in the room or no permission
|
- Prevent using an alias if that user is not in the room or no permission
|
||||||
- Spinner when loading account, past room events, images or clicking buttons
|
- Spinner when loading account, past room events, images or clicking buttons
|
||||||
|
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
@ -6,8 +6,8 @@ MenuItem {
|
||||||
spacing: theme.spacing
|
spacing: theme.spacing
|
||||||
leftPadding: spacing
|
leftPadding: spacing
|
||||||
rightPadding: spacing
|
rightPadding: spacing
|
||||||
topPadding: spacing / 1.5
|
topPadding: spacing / 1.75
|
||||||
bottomPadding: spacing / 1.5
|
bottomPadding: spacing / 1.75
|
||||||
|
|
||||||
|
|
||||||
readonly property alias iconItem: contentItem.icon
|
readonly property alias iconItem: contentItem.icon
|
||||||
|
|
|
@ -14,7 +14,7 @@ Banner {
|
||||||
{
|
{
|
||||||
name: "forget",
|
name: "forget",
|
||||||
text: qsTr("Forget"),
|
text: qsTr("Forget"),
|
||||||
iconName: "forget-room",
|
iconName: "room-forget",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -78,11 +78,20 @@ HTileDelegate {
|
||||||
|
|
||||||
contextMenu: HMenu {
|
contextMenu: HMenu {
|
||||||
HMenuItem {
|
HMenuItem {
|
||||||
|
visible: ! model.data.left
|
||||||
icon.name: invited ? "invite-decline" : "room-leave"
|
icon.name: invited ? "invite-decline" : "room-leave"
|
||||||
text: invited ? qsTr("Decline invite") : qsTr("Leave")
|
text: invited ? qsTr("Decline invite") : qsTr("Leave")
|
||||||
onTriggered: py.callClientCoro(
|
onTriggered: py.callClientCoro(
|
||||||
model.user_id, "room_leave", [model.data.room_id]
|
model.user_id, "room_leave", [model.data.room_id]
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HMenuItem {
|
||||||
|
icon.name: "room-forget"
|
||||||
|
text: qsTr("Forget")
|
||||||
|
onTriggered: py.callClientCoro(
|
||||||
|
model.user_id, "room_forget", [model.data.room_id]
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user