From 6d22634e56e837ebbcaab12a2988b8af668cd0f9 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Thu, 6 Dec 2018 23:12:19 +0000 Subject: [PATCH] streams: Remove subs.show_and_focus_on_narrow(). We stopped calling this in this commit: 3d77aa49db3492f26accabda95cb84c3ae0069ce We also remove its helper function and the obsolete event that only it was looking for. --- static/js/subs.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/static/js/subs.js b/static/js/subs.js index 5babafb080..464b8743a0 100644 --- a/static/js/subs.js +++ b/static/js/subs.js @@ -551,8 +551,6 @@ exports.setup_page = function (callback) { filter_streams(); }); - $(document).trigger($.Event('subs_page_loaded.zulip')); - if (callback) { callback(); } @@ -845,23 +843,6 @@ exports.initialize = function () { }; -function focus_on_narrowed_stream() { - var stream_name = narrow_state.stream(); - if (stream_name === undefined) { - return; - } - var sub = stream_data.get_sub(stream_name); - if (sub === undefined) { - // This stream doesn't exist, so prep for creating it. - $("#create_stream_name").val(stream_name); - } -} - -exports.show_and_focus_on_narrow = function () { - $(document).one('subs_page_loaded.zulip', focus_on_narrowed_stream); - ui_util.change_tab_to("#streams"); -}; - return exports; }());