mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 19:34:02 +02:00
Disable silence/ban buttons in PAL if avatar is replicated
This commit is contained in:
parent
8ce1474d9a
commit
0e7ddfd29f
5 changed files with 16 additions and 1 deletions
|
@ -43,6 +43,7 @@ Item {
|
|||
property bool selected: false
|
||||
property bool isAdmin: false
|
||||
property bool isPresent: true
|
||||
property bool isReplicated: false
|
||||
property string placeName: ""
|
||||
property string profilePicBorderColor: (connectionStatus == "connection" ? hifi.colors.indigoAccent : (connectionStatus == "friend" ? hifi.colors.greenHighlight : "transparent"))
|
||||
property alias avImage: avatarImage
|
||||
|
|
|
@ -473,6 +473,7 @@ Rectangle {
|
|||
visible: !isCheckBox && !isButton && !isAvgAudio;
|
||||
uuid: model ? model.sessionId : "";
|
||||
selected: styleData.selected;
|
||||
isReplicated: model.isReplicated;
|
||||
isAdmin: model && model.admin;
|
||||
isPresent: model && model.isPresent;
|
||||
// Size
|
||||
|
@ -553,6 +554,7 @@ Rectangle {
|
|||
id: actionButton;
|
||||
color: 2; // Red
|
||||
visible: isButton;
|
||||
enabled: !nameCard.isReplicated;
|
||||
anchors.centerIn: parent;
|
||||
width: 32;
|
||||
height: 32;
|
||||
|
|
|
@ -152,6 +152,15 @@ QString ScriptAvatarData::getSessionDisplayName() const {
|
|||
return QString();
|
||||
}
|
||||
}
|
||||
|
||||
bool ScriptAvatarData::getIsReplicated() const {
|
||||
if (AvatarSharedPointer sharedAvatarData = _avatarData.lock()) {
|
||||
return sharedAvatarData->getIsReplicated();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// IDENTIFIER PROPERTIES
|
||||
// END
|
||||
|
|
|
@ -45,6 +45,7 @@ class ScriptAvatarData : public QObject {
|
|||
Q_PROPERTY(QUuid sessionUUID READ getSessionUUID)
|
||||
Q_PROPERTY(QString displayName READ getDisplayName NOTIFY displayNameChanged)
|
||||
Q_PROPERTY(QString sessionDisplayName READ getSessionDisplayName)
|
||||
Q_PROPERTY(bool isReplicated READ getIsReplicated)
|
||||
|
||||
//
|
||||
// ATTACHMENT AND JOINT PROPERTIES
|
||||
|
@ -95,6 +96,7 @@ public:
|
|||
QUuid getSessionUUID() const;
|
||||
QString getDisplayName() const;
|
||||
QString getSessionDisplayName() const;
|
||||
bool getIsReplicated() const;
|
||||
|
||||
//
|
||||
// ATTACHMENT AND JOINT PROPERTIES
|
||||
|
|
|
@ -479,7 +479,8 @@ function populateNearbyUserList(selectData, oldAudioData) {
|
|||
admin: false,
|
||||
personalMute: !!id && Users.getPersonalMuteStatus(id), // expects proper boolean, not null
|
||||
ignore: !!id && Users.getIgnoreStatus(id), // ditto
|
||||
isPresent: true
|
||||
isPresent: true,
|
||||
isReplicated: avatar.isReplicated
|
||||
};
|
||||
if (id) {
|
||||
addAvatarNode(id); // No overlay for ourselves
|
||||
|
|
Loading…
Reference in a new issue