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
|
||||
- Register/Forgot? for SignIn dialog
|
||||
- Add room
|
||||
- Leave room
|
||||
- Forget room warning popup
|
||||
- Leave/forget room warning popup
|
||||
- Prevent using the SendBox if no permission (power levels)
|
||||
- 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
|
||||
|
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
@ -6,8 +6,8 @@ MenuItem {
|
|||
spacing: theme.spacing
|
||||
leftPadding: spacing
|
||||
rightPadding: spacing
|
||||
topPadding: spacing / 1.5
|
||||
bottomPadding: spacing / 1.5
|
||||
topPadding: spacing / 1.75
|
||||
bottomPadding: spacing / 1.75
|
||||
|
||||
|
||||
readonly property alias iconItem: contentItem.icon
|
||||
|
|
|
@ -14,7 +14,7 @@ Banner {
|
|||
{
|
||||
name: "forget",
|
||||
text: qsTr("Forget"),
|
||||
iconName: "forget-room",
|
||||
iconName: "room-forget",
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
@ -78,11 +78,20 @@ HTileDelegate {
|
|||
|
||||
contextMenu: HMenu {
|
||||
HMenuItem {
|
||||
visible: ! model.data.left
|
||||
icon.name: invited ? "invite-decline" : "room-leave"
|
||||
text: invited ? qsTr("Decline invite") : qsTr("Leave")
|
||||
onTriggered: py.callClientCoro(
|
||||
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