Commit dc8cbc61 authored by JC Brand's avatar JC Brand

3 changes

- immediately show chat box (sometimes fetching features takes long)
- add timeout for fetching features
- don't register scroll handler twice for chat rooms.
parent 2c88545b
...@@ -352,7 +352,7 @@ ...@@ -352,7 +352,7 @@
this.model.on('change:name', this.renderHeading, this); this.model.on('change:name', this.renderHeading, this);
this.createOccupantsView(); this.createOccupantsView();
this.render(); this.render().insertIntoDOM();
this.registerHandlers(); this.registerHandlers();
if (this.model.get('connection_status') !== ROOMSTATUS.ENTERED) { if (this.model.get('connection_status') !== ROOMSTATUS.ENTERED) {
...@@ -458,13 +458,6 @@ ...@@ -458,13 +458,6 @@
} }
}, },
afterMessagesFetched: function () {
_converse.ChatBoxView.prototype.afterMessagesFetched.apply(this, arguments);
// We only start listening for the scroll event after
// cached messages have been fetched
this.$('.chat-content').on('scroll', this.markScrolled.bind(this));
},
getExtraMessageClasses: function (attrs) { getExtraMessageClasses: function (attrs) {
var extra_classes = _converse.ChatBoxView.prototype var extra_classes = _converse.ChatBoxView.prototype
.getExtraMessageClasses.apply(this, arguments); .getExtraMessageClasses.apply(this, arguments);
...@@ -1395,7 +1388,8 @@ ...@@ -1395,7 +1388,8 @@
that.model.save(features); that.model.save(features);
return deferred.resolve(); return deferred.resolve();
}, },
deferred.reject deferred.reject,
5000
); );
return deferred.promise(); return deferred.promise();
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment