mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: New posts should update the last post date
This commit is contained in:
parent
cc11c352cf
commit
158a0daf32
2 changed files with 3 additions and 3 deletions
|
@ -696,6 +696,7 @@ export default RestModel.extend({
|
|||
const postNumber = post.get('post_number');
|
||||
if (postNumber && postNumber > (this.get('topic.highest_post_number') || 0)) {
|
||||
this.set('topic.highest_post_number', postNumber);
|
||||
this.set('topic.last_posted_at', post.get('created_at'));
|
||||
}
|
||||
|
||||
if (existing) {
|
||||
|
|
|
@ -212,13 +212,13 @@ export default createWidget('topic-timeline', {
|
|||
|
||||
if (stream.length < 3) { return; }
|
||||
|
||||
const rawLabel = relativeAge(new Date(topic.last_posted_at), { addAgo: true, defaultFormat: timelineDate });
|
||||
|
||||
let result = [];
|
||||
if (currentUser && currentUser.get('canManageTopic')) {
|
||||
result.push(h('div.timeline-controls', this.attach('topic-admin-menu-button', { topic })));
|
||||
}
|
||||
|
||||
const bottomAge = relativeAge(new Date(topic.last_posted_at), { addAgo: true, defaultFormat: timelineDate });
|
||||
result = result.concat([this.attach('link', {
|
||||
className: 'start-date',
|
||||
rawLabel: timelineDate(createdAt),
|
||||
|
@ -227,8 +227,7 @@ export default createWidget('topic-timeline', {
|
|||
this.attach('timeline-scrollarea', attrs),
|
||||
this.attach('link', {
|
||||
className: 'now-date',
|
||||
icon: 'dot-circle-o',
|
||||
rawLabel,
|
||||
rawLabel: bottomAge,
|
||||
action: 'jumpBottom'
|
||||
})]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue