mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
hashchange: Add hashchange.update_browser_history().
This helps us encapsulate the situation where we don't want to trigger hashchanged(), without having to do it within sub.js with prevent_once().
This commit is contained in:
@@ -4,9 +4,9 @@ var exports = {};
|
||||
|
||||
function setup_subscriptions_stream_hash(sub) {
|
||||
var id = sub.stream_id;
|
||||
subs.change_state.prevent_once();
|
||||
|
||||
window.location.hash = "#streams" + "/" + id + "/" + hash_util.encodeHashComponent(sub.name);
|
||||
var hash = "#streams" + "/" + id + "/" + hash_util.encodeHashComponent(sub.name);
|
||||
hashchange.update_browser_history(hash);
|
||||
}
|
||||
|
||||
function settings_for_sub(sub) {
|
||||
|
||||
Reference in New Issue
Block a user