|
@@ -2467,7 +2467,9 @@
|
|
boxes_width = newchat ? newchat.$el.outerWidth(true) : 0,
|
|
boxes_width = newchat ? newchat.$el.outerWidth(true) : 0,
|
|
new_id = newchat ? newchat.model.get('id') : null;
|
|
new_id = newchat ? newchat.model.get('id') : null;
|
|
|
|
|
|
- boxes_width += _.reduce(this.xget(new_id), this.getChatBoxWidth.bind(this));
|
|
|
|
|
|
+ boxes_width += _.reduce(this.xget(new_id), function (memo, view) {
|
|
|
|
+ return memo + this.getChatBoxWidth(view);
|
|
|
|
+ }.bind(this), 0);
|
|
|
|
|
|
if ((minimized_width + boxes_width) > $('body').outerWidth(true)) {
|
|
if ((minimized_width + boxes_width) > $('body').outerWidth(true)) {
|
|
oldest_chat = this.getOldestMaximizedChat([new_id]);
|
|
oldest_chat = this.getOldestMaximizedChat([new_id]);
|