Browse code

FIX: ponechanie otvorene chatu, ak odstranim chatujucu osobu (singlechat)

Cinan Rakosnik authored on 16/05/2013 at 19:42:22
Showing 1 changed files
... ...
@@ -20,6 +20,14 @@ class Xmpp.Views.Tabbar.TabbarView extends Backbone.View
20 20
       @closeTab(tab) if tab
21 21
     )
22 22
 
23
+    Backbone.Events.on('removeContact', (contact) =>
24
+      tab = _.find(@tabs, (_tab) =>
25
+        _tab.model.get('withWhom') == contact
26
+      )
27
+
28
+      Backbone.Events.trigger('closeChat', tab.model)
29
+    )
30
+
23 31
     @tabs = []
24 32
     @activeTab = null
25 33
     @render()