Browse Source

Compare room number properly with null.

Signed-off-by: Simon Eisenmann <simon@struktur.de>
pull/3/head
Simon Eisenmann 12 years ago committed by Simon Eisenmann
parent
commit
3407e9ad36
  1. 2
      static/js/directives/chat.js
  2. 4
      static/js/directives/usability.js

2
static/js/directives/chat.js

@ -319,7 +319,7 @@ define(['underscore', 'text!partials/chat.html', 'text!partials/chatroom.html'],
}; };
scope.$on("room", function(event, room) { scope.$on("room", function(event, room) {
if (room) { if (room !== null) {
scope.showRoom(group_chat_id, {title: translation._("Group chat")}, {restore: true, minimized: true}); scope.showRoom(group_chat_id, {title: translation._("Group chat")}, {restore: true, minimized: true});
} else { } else {
scope.hideRoom(group_chat_id); scope.hideRoom(group_chat_id);

4
static/js/directives/usability.js

@ -93,13 +93,13 @@ define(['jquery', 'underscore', 'text!partials/usability.html'], function($, _,
}); });
$scope.$on("room", function(event, room) { $scope.$on("room", function(event, room) {
//console.log("roomStatus", status); console.log("roomStatus", room !== null ? true : false);
if (complete) { if (complete) {
if (initializer !== null) { if (initializer !== null) {
$timeout.cancel(initializer); $timeout.cancel(initializer);
initializer = null; initializer = null;
} }
ctrl.setInfo(room ? "room" : "noroom"); ctrl.setInfo(room !== null ? "room" : "noroom");
} }
}); });

Loading…
Cancel
Save