Browse Source

Make sure to show title and picture in chat even when append returned nothing.

pull/16/head
Simon Eisenmann 11 years ago
parent
commit
30bce70235
  1. 11
      static/js/controllers/chatroomcontroller.js

11
static/js/controllers/chatroomcontroller.js

@ -292,9 +292,7 @@ define(['underscore', 'moment', 'text!partials/fileinfo.html'], function(_, mome
var title = null; var title = null;
var picture = null; var picture = null;
if (is_new_message) { var showTitleAndPicture = function() {
lastSender = from;
$scope.showdate(timestamp);
if ($scope.isgroupchat) { if ($scope.isgroupchat) {
title = $("<strong>"); title = $("<strong>");
title.html(displayName(from, true)); title.html(displayName(from, true));
@ -305,6 +303,12 @@ define(['underscore', 'moment', 'text!partials/fileinfo.html'], function(_, mome
picture.find("img").attr("src", imgSrc); picture.find("img").attr("src", imgSrc);
} }
} }
};
if (is_new_message) {
lastSender = from;
$scope.showdate(timestamp);
showTitleAndPicture()
} }
var message = s.join(" "); var message = s.join(" ");
@ -314,6 +318,7 @@ define(['underscore', 'moment', 'text!partials/fileinfo.html'], function(_, mome
if (element) { if (element) {
return element; return element;
} }
showTitleAndPicture();
} }
if (is_self) { if (is_self) {

Loading…
Cancel
Save