mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
UX: Don't show "X days later" unless the posts are sequential.
This fixes the display of later posts when in summary mode.
This commit is contained in:
parent
fb03c13bc6
commit
0013477453
1 changed files with 8 additions and 5 deletions
|
@ -6,6 +6,8 @@ function calcDayDiff(p1, p2) {
|
|||
const date = p1.get('created_at');
|
||||
if (date) {
|
||||
if (p2) {
|
||||
const numDiff = p1.get('post_number') - p2.get('post_number');
|
||||
if (numDiff === 1) {
|
||||
const lastDate = p2.get('created_at');
|
||||
if (lastDate) {
|
||||
const delta = new Date(date).getTime() - new Date(lastDate).getTime();
|
||||
|
@ -16,6 +18,7 @@ function calcDayDiff(p1, p2) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const PostStream = RestModel.extend({
|
||||
loading: Em.computed.or('loadingAbove', 'loadingBelow', 'loadingFilter', 'stagingPost'),
|
||||
|
|
Loading…
Reference in a new issue