mirror of https://github.com/zulip/zulip.git
Break out toggling a stream in the home view into a separate export.
(imported from commit 175b5f47685e60100d6fb7c4f9c4c18ffbe12cbe)
This commit is contained in:
parent
6b8e9a738f
commit
6dc3ef5ea8
|
@ -159,8 +159,11 @@ function set_stream_property(stream_name, property, value) {
|
|||
function stream_home_view_clicked(e) {
|
||||
var sub_row = $(e.target).closest('.subscription_row');
|
||||
var stream = sub_row.find('.subscription_name').text();
|
||||
subs.toggle_home(stream);
|
||||
}
|
||||
|
||||
var sub = get_sub(stream);
|
||||
exports.toggle_home = function (stream_name) {
|
||||
var sub = get_sub(stream_name);
|
||||
sub.in_home_view = ! sub.in_home_view;
|
||||
|
||||
setTimeout(function () {
|
||||
|
@ -188,8 +191,8 @@ function stream_home_view_clicked(e) {
|
|||
}, 0);
|
||||
|
||||
exports.maybe_toggle_all_messages();
|
||||
set_stream_property(stream, 'in_home_view', sub.in_home_view);
|
||||
}
|
||||
set_stream_property(stream_name, 'in_home_view', sub.in_home_view);
|
||||
};
|
||||
|
||||
function stream_notifications_clicked(e) {
|
||||
var sub_row = $(e.target).closest('.subscription_row');
|
||||
|
|
Loading…
Reference in New Issue