diff options
| author | Christophe Simonis <chs@openerp.com> | 2013-10-22 19:10:10 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@openerp.com> | 2013-10-22 19:10:10 +0200 |
| commit | c58f13c8e91f193201dba08b63c19c16617870d6 (patch) | |
| tree | 5bae847bb613edbb857c738fd61ec0da202c30c0 /addons/im/static/src/js/im.js | |
| parent | 91fdcc63a73f882d58316a55631012a17e10f6ca (diff) | |
[FIX] im: do not search users before start polling. This avoid a race condition for im.user creation
bzr revid: chs@openerp.com-20131022171010-ilfvqced6q8qta3h
Diffstat (limited to 'addons/im/static/src/js/im.js')
| -rw-r--r-- | addons/im/static/src/js/im.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/addons/im/static/src/js/im.js b/addons/im/static/src/js/im.js index 6fbf452f974..f4b74adebf6 100644 --- a/addons/im/static/src/js/im.js +++ b/addons/im/static/src/js/im.js @@ -62,16 +62,12 @@ this.user_search_dm = new instance.web.DropMisordered(); }, start: function() { + var self = this; this.$el.css("right", -this.$el.outerWidth()); $(window).scroll(_.bind(this.calc_box, this)); $(window).resize(_.bind(this.calc_box, this)); this.calc_box(); - this.on("change:current_search", this, this.search_changed); - this.search_changed(); - - var self = this; - return this.c_manager.start_polling().then(function() { self.c_manager.on("new_conversation", self, function(conv) { conv.$el.droppable({ @@ -80,6 +76,7 @@ } }); }); + self.search_changed(); }); }, calc_box: function() { @@ -174,4 +171,4 @@ openerp.webclient.to_kitten(); }; -})();
\ No newline at end of file +})(); |
