mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
settings: Streamline code for navigating panels.
We call hashchanged.update_browser_history() when we switch panels. This API short circuits the hashchanged callback and avoids code churn. (We weren't actually double rendering, as the downstream code does nothing at this point, so this is more just preventig a pitfall and moving to a consistent API.)
This commit is contained in:
@@ -67,7 +67,9 @@ exports.make_menu = function (opts) {
|
||||
main_elem.children("li").removeClass("active no-border");
|
||||
li_elem.addClass("active");
|
||||
li_elem.prev().addClass("no-border");
|
||||
window.location.hash = hash_prefix + section;
|
||||
|
||||
var settings_section_hash = hash_prefix + section;
|
||||
hashchange.update_browser_history(settings_section_hash);
|
||||
|
||||
$(".settings-section, .settings-wrapper").removeClass("show");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user