Ephemeral feature only if admin and secure

This commit is contained in:
Julien Wadel 2021-08-24 21:21:54 +02:00
parent e3fc1b2803
commit 9ec17ff5f1
2 changed files with 6 additions and 0 deletions

View file

@ -27,6 +27,7 @@
#include "FileDownloader.hpp"
#include "app/paths/Paths.hpp"
#include "utils/Utils.hpp"
#include "utils/Constants.hpp"
// =============================================================================

View file

@ -325,8 +325,10 @@ ColumnLayout {
height:1
width:parent.width
color:Colors.u.color
visible: devicesMenuItem.visible
}
MenuItem{
id: devicesMenuItem
//: "Conversation's devices" : Item menu to get all participant devices of the chat room
text: qsTr('conversationMenuDevices')
iconMenu: (hovered ? 'menu_devices_selected' : 'menu_devices' )
@ -343,13 +345,16 @@ ColumnLayout {
height:1
width:parent.width
color:Colors.u.color
visible: ephemeralMenuItem.visible
}
MenuItem{
id: ephemeralMenuItem
//: 'Ephemeral messages' : Item menu to enable ephemeral mode
text: qsTr('conversationMenuEphemeral')
iconMenu: (hovered ? 'menu_ephemeral_selected' : 'menu_ephemeral')
iconSizeMenu: 25
menuItemStyle : MenuItemStyle.aux2
visible: conversation.securityLevel != 1 && chatRoomModel.isMeAdmin
onTriggered: {
window.detachVirtualWindow()
window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/EphemeralChatRoom.qml')