Make click on active stream link reload the stream

closes #6466
This commit is contained in:
Steffen van Bergerem 2015-10-07 22:41:12 +02:00 committed by Jonne Haß
parent e0be1b49f1
commit 0c214cd4ca
2 changed files with 6 additions and 1 deletions

View file

@ -15,6 +15,7 @@
* Always show public photos on profile page [#6398](https://github.com/diaspora/diaspora/pull/6398) * Always show public photos on profile page [#6398](https://github.com/diaspora/diaspora/pull/6398)
* Expose Unicorn's pid option to our configuration system [#6411](https://github.com/diaspora/diaspora/pull/6411) * Expose Unicorn's pid option to our configuration system [#6411](https://github.com/diaspora/diaspora/pull/6411)
* Add stream of all public posts [#6465](https://github.com/diaspora/diaspora/pull/6465) * Add stream of all public posts [#6465](https://github.com/diaspora/diaspora/pull/6465)
* Reload stream when clicking on already active one [#6466](https://github.com/diaspora/diaspora/pull/6466)
# 0.5.3.1 # 0.5.3.1

View file

@ -113,7 +113,11 @@ var app = {
} else { } else {
$(".stream_title").text(link.text()); $(".stream_title").text(link.text());
} }
app.router.navigate(link.attr("href").substring(1) ,true);
// app.router.navigate doesn't tell us if it changed the page,
// so we use Backbone.history.navigate instead.
var change = Backbone.history.navigate(link.attr("href").substring(1) ,true);
if(change === undefined) { Backbone.history.loadUrl(link.attr("href").substring(1)); }
}); });
}, },