Fixed timestamps and added last message to the gutter

This commit is contained in:
Dave Sescleifer 2014-12-23 01:05:51 -06:00 committed by lilia
parent 1c47fb7ed8
commit 2462aba24b
4 changed files with 16 additions and 2 deletions

View file

@ -161,6 +161,10 @@
errors : []
});
if (message.get('sent_at') > conversation.get('timestamp')) {
conversation.set({ timestamp: message.get('sent_at'), lastMessage: message.get('body') });
}
conversation.save().then(function() {
message.save().then(function() {
extension.trigger('message', message); // notify frontend listeners

View file

@ -56,7 +56,9 @@
this.save({
unreadCount : 0,
active_at : now
active_at : now,
timestamp : now,
lastMessage : body
});
var sendFunc;

View file

@ -162,7 +162,11 @@ body {
letter-spacing: 0.15px;
-webkit-text-stroke: 0.2px;
margin: 0;
font-size: 12px; }
font-size: 12px;
width: 150px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; }
.gutter .contact .contact-details .last-timestamp {
position: absolute;
top: 14px;

View file

@ -99,6 +99,10 @@
-webkit-text-stroke: 0.2px;
margin:0;
font-size: 12px;
width: 150px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.last-timestamp {
position:absolute;