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:
miruka 2019-08-21 16:29:44 -04:00
parent 437324bd64
commit 076ff743ad
5 changed files with 13 additions and 5 deletions

View File

@ -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

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -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

View File

@ -14,7 +14,7 @@ Banner {
{
name: "forget",
text: qsTr("Forget"),
iconName: "forget-room",
iconName: "room-forget",
}
]

View File

@ -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]
)
}
}
}