diff --git a/css/base.css b/css/base.css
index 69c486cc..a3a3edad 100644
--- a/css/base.css
+++ b/css/base.css
@@ -922,14 +922,9 @@ table.permission-editor td.checkbox {
background-image: url("../img/ignasi_pattern_s.png");
}
-#messages-panel.write-only::after {
- content: "";
- display: block;
- position: absolute;
- top:0;
- right: 0;
- bottom: 0;
- left: 0;
+#write-only-background {
+ height: 100%;
+ width: 100%;
background-image: repeating-linear-gradient(45deg,
transparent, transparent 0.5rem, rgba(255,255,255,.5) 0.5rem, rgba(255,255,255,.5) 1rem);
}
diff --git a/index.html b/index.html
index 8b2ba9a4..4b5f4584 100644
--- a/index.html
+++ b/index.html
@@ -1855,24 +1855,24 @@
var ContactsView = React.createClass({
getInitialState: function() {
return {
- contactList: this.prepareContactList()
+ contactList: this.prepareContactList(),
+ initialLoadComplete: false
};
},
componentWillMount: function() {
var me = Tinode.getMeTopic();
- me.onContactUpdate = this.tnMeContactUpdate;
- me.onSubsUpdated = this.tnMeSubsUpdated;
- },
- componentWillUnmount: function() {
- var me = Tinode.getMeTopic();
- me.onContactUpdate = undefined;
- me.onSubsUpdated = undefined;
+ if (!me.onContactUpdate) {
+ me.onContactUpdate = this.tnMeContactUpdate;
+ me.onSubsUpdated = this.tnMeSubsUpdated;
+ }
},
// Reactions to updates to the contact list.
tnMeContactUpdate: function(what, cont) {
- if (what === "on" || what === "off") {
+ console.log("presence", this.props.topicSelected, cont.topic, what);
+ if (what == "on" || what == "off") {
this.resetContactList();
if (this.props.topicSelected === cont.topic) {
+ console.log("Online/offline", cont.topic, what);
this.props.onOnlineChange(what === "on");
}
} else if (what === "read") {
@@ -1934,16 +1934,14 @@
});
updateFavicon(totalUnread > 0);
- // Sort: most recent to less recent.
- //contacts.sort(function(a, b) {
- // return a.updated - b.updated;
- //});
-
return contacts;
},
resetContactList: function() {
- this.setState({contactList: this.prepareContactList()});
+ if (!this.state.initialLoadComplete) {
+ console.log("update winodow.location.hash now!!!");
+ }
+ this.setState({contactList: this.prepareContactList(), initialLoadComplete: true});
},
render: function() {
@@ -3512,18 +3510,20 @@