stream settings: Fix "Saving" widget for Muted streams.

"Saving" widget was working for all personal stream settings but "Mute
notifications". This was because the change to the "Mute" property follows
a slightly different path.
This commit is contained in:
Pragati Agrawal
2020-05-24 17:13:22 +05:30
committed by Tim Abbott
parent f7a886d821
commit 55db6ed1e3
2 changed files with 3 additions and 3 deletions

View File

@@ -311,7 +311,7 @@ function stream_is_muted_clicked(e) {
const sub_settings = exports.settings_for_sub(sub);
const notification_checkboxes = sub_settings.find(".sub_notification_setting");
subs.toggle_home(sub);
subs.toggle_home(sub, `#stream_change_property_status${sub.stream_id}`);
if (!sub.is_muted) {
sub_settings.find(".mute-note").addClass("hide-mute-note");

View File

@@ -95,9 +95,9 @@ exports.active_stream = function () {
}
};
exports.toggle_home = function (sub) {
exports.toggle_home = function (sub, status_element) {
stream_muting.update_is_muted(sub, !sub.is_muted);
stream_edit.set_stream_property(sub, 'is_muted', sub.is_muted);
stream_edit.set_stream_property(sub, 'is_muted', sub.is_muted, status_element);
};
exports.toggle_pin_to_top_stream = function (sub) {