Fixed timestamps and added last message to the gutter
This commit is contained in:
parent
1c47fb7ed8
commit
2462aba24b
4 changed files with 16 additions and 2 deletions
|
@ -161,6 +161,10 @@
|
||||||
errors : []
|
errors : []
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (message.get('sent_at') > conversation.get('timestamp')) {
|
||||||
|
conversation.set({ timestamp: message.get('sent_at'), lastMessage: message.get('body') });
|
||||||
|
}
|
||||||
|
|
||||||
conversation.save().then(function() {
|
conversation.save().then(function() {
|
||||||
message.save().then(function() {
|
message.save().then(function() {
|
||||||
extension.trigger('message', message); // notify frontend listeners
|
extension.trigger('message', message); // notify frontend listeners
|
||||||
|
|
|
@ -56,7 +56,9 @@
|
||||||
|
|
||||||
this.save({
|
this.save({
|
||||||
unreadCount : 0,
|
unreadCount : 0,
|
||||||
active_at : now
|
active_at : now,
|
||||||
|
timestamp : now,
|
||||||
|
lastMessage : body
|
||||||
});
|
});
|
||||||
|
|
||||||
var sendFunc;
|
var sendFunc;
|
||||||
|
|
|
@ -162,7 +162,11 @@ body {
|
||||||
letter-spacing: 0.15px;
|
letter-spacing: 0.15px;
|
||||||
-webkit-text-stroke: 0.2px;
|
-webkit-text-stroke: 0.2px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 12px; }
|
font-size: 12px;
|
||||||
|
width: 150px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis; }
|
||||||
.gutter .contact .contact-details .last-timestamp {
|
.gutter .contact .contact-details .last-timestamp {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 14px;
|
top: 14px;
|
||||||
|
|
|
@ -99,6 +99,10 @@
|
||||||
-webkit-text-stroke: 0.2px;
|
-webkit-text-stroke: 0.2px;
|
||||||
margin:0;
|
margin:0;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
width: 150px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
.last-timestamp {
|
.last-timestamp {
|
||||||
position:absolute;
|
position:absolute;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue