mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
navbar: Extract "render_title_area" from "initialize".
This is a prep commit for adding better support for live rerendering, we can now just call "render_title_area" when we need to perform a rerender.
This commit is contained in:
@@ -150,8 +150,7 @@ exports.update_stream_description = function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.initialize = function () {
|
exports.initialize = function () {
|
||||||
const filter = narrow_state.filter();
|
exports.render_title_area();
|
||||||
build_tab_bar(filter);
|
|
||||||
|
|
||||||
// register searchbar click handler
|
// register searchbar click handler
|
||||||
$('#search_exit').on("click", function (e) {
|
$('#search_exit').on("click", function (e) {
|
||||||
@@ -161,6 +160,11 @@ exports.initialize = function () {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.render_title_area = function () {
|
||||||
|
const filter = narrow_state.filter();
|
||||||
|
build_tab_bar(filter);
|
||||||
|
};
|
||||||
|
|
||||||
exports.open_search_bar_and_close_narrow_description = function () {
|
exports.open_search_bar_and_close_narrow_description = function () {
|
||||||
$(".navbar-search").addClass("expanded");
|
$(".navbar-search").addClass("expanded");
|
||||||
$("#tab_list").addClass("hidden");
|
$("#tab_list").addClass("hidden");
|
||||||
|
|||||||
Reference in New Issue
Block a user