mirror of https://github.com/calzoneman/sync.git
Fix checkbox glitchiness (Issue#21)
This commit is contained in:
parent
c175f461d1
commit
2ee182eb48
|
@ -702,7 +702,12 @@ function updateChatFilters(entries) {
|
||||||
remove.click(remcallback);
|
remove.click(remcallback);
|
||||||
|
|
||||||
var actcallback = (function(filter) { return function() {
|
var actcallback = (function(filter) { return function() {
|
||||||
filter[2] = active.prop("checked");
|
// Apparently when you check a checkbox, its value is changed
|
||||||
|
// before this callback. When you uncheck it, its value is not
|
||||||
|
// changed before this callback
|
||||||
|
// [](/amgic)
|
||||||
|
var enabled = active.prop("checked");
|
||||||
|
filter[2] = (filter[2] == enabled) ? !enabled : enabled;
|
||||||
socket.emit("chatFilter", {
|
socket.emit("chatFilter", {
|
||||||
cmd: "update",
|
cmd: "update",
|
||||||
filter: filter
|
filter: filter
|
||||||
|
|
Loading…
Reference in New Issue