FIX: Topic title wasn't showing properly when entering lower in topics
This commit is contained in:
parent
322ed7124e
commit
f3540332a8
|
@ -142,10 +142,13 @@ export default Ember.Component.extend(AddArchetypeClass, Scrolling, {
|
|||
this.appEvents.trigger('header:show-topic', topic);
|
||||
} else {
|
||||
if (!DiscourseURL.isJumpScheduled()) {
|
||||
const loadingNear = topic.get('postStream.loadingNearPost') || 1;
|
||||
if (loadingNear === 1) {
|
||||
this.appEvents.trigger('header:hide-topic');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger a scrolled event
|
||||
this.appEvents.trigger('topic:scrolled', offset);
|
||||
|
|
|
@ -94,11 +94,15 @@ export default Ember.Component.extend(CleansUp, {
|
|||
|
||||
actions: {
|
||||
enterTop() {
|
||||
DiscourseURL.routeTo(this.get('topic.url'));
|
||||
const topic = this.get('topic');
|
||||
this.appEvents.trigger('header:update-topic', topic);
|
||||
DiscourseURL.routeTo(topic.get('url'));
|
||||
},
|
||||
|
||||
enterBottom() {
|
||||
DiscourseURL.routeTo(this.get('topic.lastPostUrl'));
|
||||
const topic = this.get('topic');
|
||||
this.appEvents.trigger('header:update-topic', topic);
|
||||
DiscourseURL.routeTo(topic.get('lastPostUrl'));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -15,6 +15,7 @@ export default RestModel.extend({
|
|||
loadingAbove: null,
|
||||
loadingBelow: null,
|
||||
loadingFilter: null,
|
||||
loadingNearPost: null,
|
||||
stagingPost: null,
|
||||
postsWithPlaceholders: null,
|
||||
timelineLookup: null,
|
||||
|
@ -206,6 +207,7 @@ export default RestModel.extend({
|
|||
|
||||
// TODO: if we have all the posts in the filter, don't go to the server for them.
|
||||
this.set('loadingFilter', true);
|
||||
this.set('loadingNearPost', opts.nearPost);
|
||||
|
||||
opts = _.merge(opts, this.get('streamFilters'));
|
||||
|
||||
|
@ -216,6 +218,8 @@ export default RestModel.extend({
|
|||
}).catch(result => {
|
||||
this.errorLoading(result);
|
||||
throw result;
|
||||
}).finally(() => {
|
||||
this.set('loadingNearPost', null);
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue