Fix message time display

This commit is contained in:
Philippe Proulx 2013-10-06 00:17:13 -04:00
parent 8a07be5aef
commit d332635a4e
3 changed files with 4 additions and 4 deletions

View file

@ -50,7 +50,7 @@
<a ng-click="setActiveBuffer(key)">{{ content.full_name }}</a> <a ng-click="setActiveBuffer(key)">{{ content.full_name }}</a>
</span> </span>
<div ng-repeat="bufferline in activeBuffer.lines"> <div ng-repeat="bufferline in activeBuffer.lines">
<span class="timestamp color-dark-gray">{{ bufferline.timestamp | date: 'h:mm:ss'}}</span> <span class="timestamp color-dark-gray">{{ bufferline.date | date: 'H:mm:ss'}}</span>
<span ng-repeat="part in bufferline.content" class="text {{ part.fg }}"> <span ng-repeat="part in bufferline.content" class="text {{ part.fg }}">
{{ part.text }} {{ part.text }}
</span> </span>

View file

@ -224,7 +224,7 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'pluginManager', function($
var buffer = message['objects'][0]['content'][0]['buffer']; var buffer = message['objects'][0]['content'][0]['buffer'];
var timestamp = parseInt(message['objects'][0]['content'][0]['date']) * 1e3; var date = message['objects'][0]['content'][0]['date'];
var text = colors.parse(message['objects'][0]['content'][0]['message']); var text = colors.parse(message['objects'][0]['content'][0]['message']);
var content = parseLineAddedTextElements(message); var content = parseLineAddedTextElements(message);
var additionalContent = pluginManager.contentForMessage(text[0]['text']); var additionalContent = pluginManager.contentForMessage(text[0]['text']);
@ -232,7 +232,7 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'pluginManager', function($
return { return {
metadata: additionalContent, metadata: additionalContent,
content: content, content: content,
timestamp: timestamp, date: date,
buffer: buffer buffer: buffer
} }

View file

@ -455,7 +455,7 @@ WeeChatProtocol.prototype = {
_getTime: function() { _getTime: function() {
var str = this._getStrNumber(); var str = this._getStrNumber();
return new Date(parseInt(str)); return new Date(parseInt(str) * 1000);
}, },
/** /**