fix: #8838, fix chat dropdown timestamps

use shorthand like notification dropdown
v1.18.x
Barış Soner Uşaklı 4 years ago
parent 76cd5b0fc1
commit 78ee83324c

@ -3,7 +3,8 @@
define('chat', [
'components',
'taskbar',
], function (components, taskbar) {
'translator',
], function (components, taskbar, translator) {
var module = {};
var newMessage = false;
@ -20,6 +21,11 @@ define('chat', [
return room.teaser;
});
translator.toggleTimeagoShorthand(function () {
for (var i = 0; i < rooms.length; i += 1) {
rooms[i].teaser.timeago = $.timeago(new Date(parseInt(rooms[i].teaser.timestamp, 10)));
}
translator.toggleTimeagoShorthand();
app.parseAndTranslate('partials/chats/dropdown', { rooms: rooms }, function (html) {
chatsListEl.find('*').not('.navigation-link').remove();
chatsListEl.prepend(html);
@ -45,6 +51,7 @@ define('chat', [
});
});
});
});
};

Loading…
Cancel
Save