hashchange: Go through hashchange to narrow to All messsages.

We should not allow every function who wants to narrow to All
messages to come up with their own method to do so. This
commit makes existing such functions use hashchange library to
do so.

Remove click event on All message button, it already contains
an <a> tag which navigates correctly.
This commit is contained in:
Aman Agrawal
2020-07-03 14:08:24 +05:30
committed by Tim Abbott
parent 8b29c38e62
commit 0859a91b14
6 changed files with 13 additions and 13 deletions

View File

@@ -569,16 +569,6 @@ exports.initialize = function () {
// HOME
$(document).on("click", ".top_left_all_messages", (e) => {
ui_util.change_tab_to("#home");
narrow.deactivate();
search.update_button_visibility();
// We need to maybe scroll to the selected message
// once we have the proper viewport set up
setTimeout(navigate.maybe_scroll_to_selected, 0);
e.preventDefault();
});
$(".brand").on("click", (e) => {
if (overlays.is_active()) {
overlays.close_active();