mirror of https://github.com/zulip/zulip.git
stream edit: Fix real-time sync of stream notification setting.
The UI in the `#settings/notifications` page is updated similarly to what is done in the `update_global_notifications` path present in the `server_events_dispatch` file.
This commit is contained in:
parent
7d39d7b17f
commit
5a5fc6caa1
|
@ -2,6 +2,10 @@ const noop = function () {};
|
|||
const return_true = function () { return true; };
|
||||
set_global('$', global.make_zjquery());
|
||||
set_global('document', 'document-stub');
|
||||
const _settings_notifications = {
|
||||
update_page: () => {},
|
||||
};
|
||||
set_global('settings_notifications', _settings_notifications);
|
||||
|
||||
zrequire('people');
|
||||
zrequire('stream_data');
|
||||
|
|
|
@ -29,7 +29,9 @@ exports.update_property = function (stream_id, property, value, other_values) {
|
|||
case 'audible_notifications':
|
||||
case 'push_notifications':
|
||||
case 'email_notifications':
|
||||
case 'wildcard_mentions_notify':
|
||||
update_stream_setting(sub, value, property);
|
||||
settings_notifications.update_page();
|
||||
break;
|
||||
case 'name':
|
||||
subs.update_stream_name(sub, value);
|
||||
|
@ -50,9 +52,6 @@ exports.update_property = function (stream_id, property, value, other_values) {
|
|||
history_public_to_subscribers: other_values.history_public_to_subscribers,
|
||||
});
|
||||
break;
|
||||
case 'wildcard_mentions_notify':
|
||||
update_stream_setting(sub, value, property);
|
||||
break;
|
||||
case 'stream_post_policy':
|
||||
subs.update_stream_post_policy(sub, value);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue