bug fixes

This commit is contained in:
Gene S
2016-02-18 19:30:21 -08:00
parent 103184c8da
commit e278ebda5d
2 changed files with 13 additions and 10 deletions
+9 -6
View File
@@ -10,17 +10,12 @@
rel="stylesheet" type="text/css" />
<!-- Google's material design icons -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<!-- Customized Bootstrap style (material design). -->
<!--link rel="stylesheet" href="css/bootstrap.css" /-->
<!-- Styles for local elements -->
<link rel="stylesheet" href="css/base.css" />
<!-- ReactJs scripts -->
<script src="https://fb.me/react-0.14.7.js"></script>
<script src="https://fb.me/react-dom-0.14.7.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script>
<!-- Some scripts to make bootstrap more dynamic -->
<!--script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script-->
<!--script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script-->
<script src="tinode.js"></script>
</head>
<body>
@@ -528,8 +523,16 @@
tnMeContactUpdate: function(what, cont) {
if (what === "on" || what === "off" || what === "read") {
this.forceUpdate();
} else if (what === "msg") {
// Skip update if the topic is currently open, otherwise a badge will annoyingly pop up.
if (this.state.selected !== cont.topic) {
this.forceUpdate();
}
} else if (what === "recv") {
// Explicitly ignoring "recv"
} else {
console.log("changed (not updating for it): " + what + " in :");
// TODO(gene): handle other types of notifications
console.log("changed (not updating for it): " + what + " in:");
console.log(cont);
}
},