friends checkbox speedup

This commit is contained in:
David Kelly 2017-04-06 14:07:07 -07:00
parent 494c8d868e
commit 726395ac3e

View file

@ -840,11 +840,7 @@ Rectangle {
pal.sendToScript({method: newValue ? 'addFriend' : 'removeFriend', params: model.userName});
UserActivityLogger["palAction"](newValue ? styleData.role : "un-" + styleData.role, model.sessionId);
// http://doc.qt.io/qt-5/qtqml-syntax-propertybinding.html#creating-property-bindings-from-javascript
// I'm using an explicit binding here because clicking a checkbox breaks the implicit binding as set by
// "checked:" statement above.
checked = Qt.binding(function() { return (model["connection"] === "friend" ? true : false)});
checked = newValue;
}
}
}