settings: Simplify logic to show push notification tooltip in templates.

Instead of having logical expressions in templates, it's always preferred
to calculating them in javascript and pass the results as a context. It
also enhances the readability of templates and testing of such logic is
easier in js over templates.
This commit is contained in:
Pragati Agrawal
2020-03-22 22:33:25 +05:30
committed by Tim Abbott
parent 1871443d10
commit 83933034a4
5 changed files with 19 additions and 18 deletions

View File

@@ -3,10 +3,14 @@ zrequire('muting');
zrequire('people');
zrequire('stream_data');
zrequire('unread');
set_global('page_params', {
realm_push_notifications_enabled: false,
});
zrequire('settings_notifications');
const FoldDict = zrequire('fold_dict').FoldDict;
set_global('page_params', {});
set_global('blueslip', {});
set_global('narrow_state', {});
set_global('current_msg_list', {});