mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Regression with time-gap
showing decimals and no clearfix
This commit is contained in:
parent
d1e85bdd8b
commit
2b1e7306e1
@ -48,7 +48,7 @@ export default createWidget('post-stream', {
|
|||||||
// Handle time gaps
|
// Handle time gaps
|
||||||
const curTime = new Date(transformed.created_at).getTime();
|
const curTime = new Date(transformed.created_at).getTime();
|
||||||
if (prevDate) {
|
if (prevDate) {
|
||||||
const daysSince = (curTime - prevDate) / DAY;
|
const daysSince = Math.floor((curTime - prevDate) / DAY);
|
||||||
if (daysSince > this.siteSettings.show_time_gap_days) {
|
if (daysSince > this.siteSettings.show_time_gap_days) {
|
||||||
result.push(this.attach('time-gap', { daysSince }));
|
result.push(this.attach('time-gap', { daysSince }));
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ function description(attrs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default createWidget('time-gap', {
|
export default createWidget('time-gap', {
|
||||||
tagName: 'div.time-gap.small-action',
|
tagName: 'div.time-gap.small-action.clearfix',
|
||||||
|
|
||||||
html(attrs) {
|
html(attrs) {
|
||||||
return [h('div.topic-avatar', iconNode('clock-o')),
|
return [h('div.topic-avatar', iconNode('clock-o')),
|
||||||
|
Loading…
Reference in New Issue
Block a user