mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 16:24:55 +00: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
|
||||
const curTime = new Date(transformed.created_at).getTime();
|
||||
if (prevDate) {
|
||||
const daysSince = (curTime - prevDate) / DAY;
|
||||
const daysSince = Math.floor((curTime - prevDate) / DAY);
|
||||
if (daysSince > this.siteSettings.show_time_gap_days) {
|
||||
result.push(this.attach('time-gap', { daysSince }));
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ function description(attrs) {
|
||||
}
|
||||
|
||||
export default createWidget('time-gap', {
|
||||
tagName: 'div.time-gap.small-action',
|
||||
tagName: 'div.time-gap.small-action.clearfix',
|
||||
|
||||
html(attrs) {
|
||||
return [h('div.topic-avatar', iconNode('clock-o')),
|
||||
|
Loading…
x
Reference in New Issue
Block a user