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

Loading…
Cancel
Save