Disable room context menu entries while offline
Except "Copy room ID"
This commit is contained in:
parent
7580686598
commit
12b6b74881
|
@ -115,7 +115,7 @@ HTile {
|
||||||
contextMenu: HMenu {
|
contextMenu: HMenu {
|
||||||
HMenuItemPopupSpawner {
|
HMenuItemPopupSpawner {
|
||||||
visible: joined
|
visible: joined
|
||||||
enabled: model.can_invite
|
enabled: model.can_invite && accountModel.presence !== "offline"
|
||||||
icon.name: "room-send-invite"
|
icon.name: "room-send-invite"
|
||||||
text: qsTr("Invite members")
|
text: qsTr("Invite members")
|
||||||
|
|
||||||
|
@ -142,6 +142,7 @@ HTile {
|
||||||
model.inviter_name, model.inviter_id
|
model.inviter_name, model.inviter_id
|
||||||
))
|
))
|
||||||
label.textFormat: Text.StyledText
|
label.textFormat: Text.StyledText
|
||||||
|
enabled: accountModel.presence !== "offline"
|
||||||
|
|
||||||
onTriggered: py.callClientCoro(
|
onTriggered: py.callClientCoro(
|
||||||
model.for_account, "join", [model.id]
|
model.for_account, "join", [model.id]
|
||||||
|
@ -153,6 +154,7 @@ HTile {
|
||||||
icon.name: invited ? "invite-decline" : "room-leave"
|
icon.name: invited ? "invite-decline" : "room-leave"
|
||||||
icon.color: theme.colors.negativeBackground
|
icon.color: theme.colors.negativeBackground
|
||||||
text: invited ? qsTr("Decline invite") : qsTr("Leave")
|
text: invited ? qsTr("Decline invite") : qsTr("Leave")
|
||||||
|
enabled: accountModel.presence !== "offline"
|
||||||
|
|
||||||
popup: "Popups/LeaveRoomPopup.qml"
|
popup: "Popups/LeaveRoomPopup.qml"
|
||||||
properties: ({
|
properties: ({
|
||||||
|
@ -166,6 +168,7 @@ HTile {
|
||||||
icon.name: "room-forget"
|
icon.name: "room-forget"
|
||||||
icon.color: theme.colors.negativeBackground
|
icon.color: theme.colors.negativeBackground
|
||||||
text: qsTr("Forget")
|
text: qsTr("Forget")
|
||||||
|
enabled: accountModel.presence !== "offline"
|
||||||
|
|
||||||
popup: "Popups/ForgetRoomPopup.qml"
|
popup: "Popups/ForgetRoomPopup.qml"
|
||||||
autoDestruct: false
|
autoDestruct: false
|
||||||
|
|
Loading…
Reference in New Issue
Block a user