FIX: Redirect to Top was showing "latest" content because it was in the
preload store.
This commit is contained in:
parent
d09f109b2c
commit
abd84cd2a1
|
@ -247,7 +247,7 @@ Discourse.TopicList.reopenClass({
|
|||
},
|
||||
|
||||
find: function(filter, params) {
|
||||
return PreloadStore.getAndRemove("topic_list", finderFor(filter, params)).then(function(result) {
|
||||
return PreloadStore.getAndRemove("topic_list_" + filter, finderFor(filter, params)).then(function(result) {
|
||||
return Discourse.TopicList.from(result, filter, params);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ Discourse.DiscoveryRoute = Discourse.Route.extend(Discourse.ScrollTop, Discourse
|
|||
if (transition.targetName.indexOf("discovery.top") === -1 &&
|
||||
Discourse.User.currentProp("should_be_redirected_to_top")) {
|
||||
Discourse.User.currentProp("should_be_redirected_to_top", false);
|
||||
this.transitionTo("discovery.top");
|
||||
this.replaceWith("discovery.top");
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ class ListController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.html do
|
||||
@list = list
|
||||
store_preloaded('topic_list', MultiJson.dump(TopicListSerializer.new(list, scope: guardian)))
|
||||
store_preloaded("topic_list_#{list.filter}", MultiJson.dump(TopicListSerializer.new(list, scope: guardian)))
|
||||
render 'list'
|
||||
end
|
||||
format.json do
|
||||
|
|
Loading…
Reference in New Issue