Commit b3ed43c4 authored by JC Brand's avatar JC Brand

Don't fetch rooms on roster or when leaving a room

Inefficient, causes way too much traffic and takes very long
parent df7f1ccf
......@@ -8,7 +8,7 @@ img.spinner {
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
margin: 5px;
margin: 0;
padding: 0 5px 0 5px;
}
......
......@@ -750,12 +750,14 @@
}, this));
} else {
$available_chatrooms.html('<dt>No rooms on '+this.muc_domain+'</dt>');
$('input#show-rooms').show().siblings('img.spinner').remove();
}
return true;
}, this),
$.proxy(function (iq) { // Failure
var $available_chatrooms = this.$el.find('#available-chatrooms');
$available_chatrooms.html('<dt>No rooms on '+this.muc_domain+'</dt>');
$('input#show-rooms').show().siblings('img.spinner').remove();
}, this));
},
......@@ -985,7 +987,6 @@
$.proxy(this.onChatRoomPresence, this),
$.proxy(this.onChatRoomRoster, this));
this.model.messages.on('add', this.showMessage, this);
this.model.on('destroy', function (model, response, options) {
this.$el.hide('fast');
......@@ -1000,12 +1001,7 @@
this.render().show().model.messages.fetch({add: true});
},
onLeave: function () {
var controlboxview = converse.chatboxesview.views.controlbox;
if (controlboxview) {
controlboxview.roomspanel.trigger('update-rooms-list');
}
},
onLeave: function () {},
onChatRoomPresence: function (presence, room) {
var nick = room.nick,
......@@ -1113,9 +1109,6 @@
$participant_list = this.$el.find('.participant-list'),
participants = [],
i;
if (controlboxview) {
controlboxview.roomspanel.trigger('update-rooms-list');
}
this.$el.find('.participant-list').empty();
for (i=0; i<roster_size; i++) {
participants.push('<li>' + Strophe.unescapeNode(_.keys(roster)[i]) + '</li>');
......
......@@ -5,6 +5,6 @@ require(["jquery", "converse"], function($, converse) {
prebind: false,
xhr_user_search: false,
auto_subscribe: false,
auto_list_rooms: false
auto_list_rooms: false
});
});
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