Fix: change mobile sidebar click target to call new popover function.

This changes the click target that opens the mobile sidebar to call the
new popover function in stream_popover rather than the old popovers
object.
This commit is contained in:
Brock Whittaker 2017-03-08 14:39:39 -08:00 committed by Tim Abbott
parent 76ccf2732c
commit 1d2c3cec10
2 changed files with 4 additions and 4 deletions

View File

@ -225,7 +225,7 @@ $(function () {
var sidebarHidden = !$(".app-main .column-left").hasClass("expanded");
popovers.hide_all();
if (sidebarHidden) {
popovers.show_streamlist_sidebar();
stream_popover.show_streamlist_sidebar();
}
});

View File

@ -32,7 +32,7 @@ exports.hide_topic_popover = function () {
// These are the only two functions that is really shared by the
// two popovers, so we could split out topic stuff to
// another module pretty easily.
exports.resize_stream_list = function () {
exports.show_streamlist_sidebar = function () {
$(".app-main .column-left").addClass("expanded");
resize.resize_page_components();
};
@ -82,7 +82,7 @@ function build_stream_popover(e) {
}
popovers.hide_all();
exports.resize_stream_list();
exports.show_streamlist_sidebar();
var stream = $(elt).parents('li').attr('data-name');
@ -130,7 +130,7 @@ function build_topic_popover(e) {
}
popovers.hide_all();
exports.resize_stream_list();
exports.show_streamlist_sidebar();
var is_muted = muting.is_topic_muted(stream_name, topic_name);
var can_mute_topic = !is_muted;