FIX: Back button not working well to latest

This commit is contained in:
Robin Ward 2014-06-09 14:05:26 -04:00
parent 7adb545168
commit 9d96fc6370
3 changed files with 13 additions and 6 deletions

View File

@ -1,10 +1,6 @@
export default Ember.Component.extend({
classNames: ["title"],
linkUrl: function() {
return Discourse.getURL("/");
}.property(),
showSmallLogo: function() {
return !Discourse.Mobile.mobileView && this.get("minimized");
}.property("minimized"),
@ -12,4 +8,15 @@ export default Ember.Component.extend({
smallLogoUrl: Discourse.computed.setting('logo_small_url'),
bigLogoUrl: Discourse.computed.setting('logo_url'),
title: Discourse.computed.setting('title'),
click: function(e) {
e.preventDefault();
// When you click the logo, never use a cached list
var session = Discourse.Session.current();
session.setProperties({topicList: null, topicListScrollPos: null});
Discourse.URL.routeTo('/');
return false;
}
});

View File

@ -205,7 +205,7 @@ Discourse.TopicList.reopenClass({
var session = Discourse.Session.current(),
list = session.get('topicList');
if (list && (list.get('filter') === filter) && window.location.pathname.indexOf('more') > 0) {
if (list && (list.get('filter') === filter)) {
list.set('loaded', true);
return Ember.RSVP.resolve(list);
}

View File

@ -1,4 +1,4 @@
<a href="{{unbound linkUrl}}">
<a href='#'>
{{#if showSmallLogo}}
{{#if smallLogoUrl}}
<img class="logo-small" src="{{unbound smallLogoUrl}}" width="33" height="33">