Prevent logspam

This commit is contained in:
Zach Fox 2017-01-19 17:37:09 -08:00
parent c83cd4a94a
commit 9c9206acc0

View file

@ -218,10 +218,10 @@ Rectangle {
id: nameCard id: nameCard
// Properties // Properties
displayName: styleData.value displayName: styleData.value
userName: model && model.userName userName: model ? model.userName : ""
audioLevel: model && model.audioLevel audioLevel: model ? model.audioLevel : 0.0
visible: !isCheckBox && !isButton visible: !isCheckBox && !isButton
uuid: model && model.sessionId uuid: model ? model.sessionId : ""
selected: styleData.selected selected: styleData.selected
isAdmin: model && model.admin isAdmin: model && model.admin
// Size // Size
@ -241,9 +241,9 @@ Rectangle {
id: actionCheckBox id: actionCheckBox
visible: isCheckBox visible: isCheckBox
anchors.centerIn: parent anchors.centerIn: parent
checked: model[styleData.role] checked: model ? model[styleData.role] : false
// If this is a "Personal Mute" checkbox, disable the checkbox if the "Ignore" checkbox is checked. // If this is a "Personal Mute" checkbox, disable the checkbox if the "Ignore" checkbox is checked.
enabled: !(styleData.role === "personalMute" && model["ignore"]) enabled: !(styleData.role === "personalMute" && (model ? model["ignore"] : true))
boxSize: 24 boxSize: 24
onClicked: { onClicked: {
var newValue = !model[styleData.role] var newValue = !model[styleData.role]