diff --git a/web/src/inbox_ui.js b/web/src/inbox_ui.js index 6e13f6ef8e..21ee0f6b30 100644 --- a/web/src/inbox_ui.js +++ b/web/src/inbox_ui.js @@ -17,7 +17,6 @@ import {localstorage} from "./localstorage"; import * as message_store from "./message_store"; import * as modals from "./modals"; import * as overlays from "./overlays"; -import {page_params} from "./page_params"; import * as people from "./people"; import * as popovers from "./popovers"; import * as sidebar_ui from "./sidebar_ui"; @@ -313,15 +312,11 @@ function format_topic(stream_id, topic, topic_unread_count, latest_msg_id) { is_collapsed: collapsed_containers.has(STREAM_HEADER_PREFIX + stream_id), mention_in_unread: unread.topic_has_any_unread_mentions(stream_id, topic), latest_msg_id, - // The following two fields (development & all_visibility_policies) - // are not specific to this context, but this is the easiest way - // we've figured out for passing the data to the template rendering. - development: page_params.development_environment, + // The 'all_visibility_policies' field is not specific to this context, + // but this is the easiest way we've figured out for passing the data + // to the template rendering. all_visibility_policies: user_topics.all_visibility_policies, visibility_policy: user_topics.get_topic_visibility_policy(stream_id, topic), - topic_muted: Boolean(user_topics.is_topic_muted(stream_id, topic)), - topic_unmuted: Boolean(user_topics.is_topic_unmuted(stream_id, topic)), - stream_muted: sub_store.get(stream_id).is_muted, }; return context; diff --git a/web/src/message_list_view.js b/web/src/message_list_view.js index 996c2d762b..717a4f9b85 100644 --- a/web/src/message_list_view.js +++ b/web/src/message_list_view.js @@ -230,20 +230,16 @@ function populate_group_from_message_container(group, message_container) { group.stream_id = -1; } else { group.stream_id = sub.stream_id; - group.stream_muted = sub.is_muted; } group.is_subscribed = stream_data.is_subscribed(group.stream_id); group.topic_is_resolved = resolved_topic.is_resolved(group.topic); - group.topic_muted = user_topics.is_topic_muted(group.stream_id, group.topic); - group.topic_unmuted = user_topics.is_topic_unmuted(group.stream_id, group.topic); group.visibility_policy = user_topics.get_topic_visibility_policy( group.stream_id, group.topic, ); - // The following two fields are not specific to this group, but this is the + // The following field is not specific to this group, but this is the // easiest way we've figured out for passing the data to the template rendering. - group.development = page_params.development_environment; group.all_visibility_policies = user_topics.all_visibility_policies; } else if (group.is_private) { group.pm_with_url = message_container.pm_with_url; diff --git a/web/src/popover_menus_data.js b/web/src/popover_menus_data.js index 723dcae113..4cb7f149db 100644 --- a/web/src/popover_menus_data.js +++ b/web/src/popover_menus_data.js @@ -118,7 +118,6 @@ export function get_actions_popover_content_context(message_id) { export function get_topic_popover_content_context({stream_id, topic_name, url}) { const sub = sub_store.get(stream_id); - const topic_muted = user_topics.is_topic_muted(sub.stream_id, topic_name); const topic_unmuted = user_topics.is_topic_unmuted(sub.stream_id, topic_name); const has_starred_messages = starred_messages.get_count_in_topic(sub.stream_id, topic_name) > 0; const can_move_topic = settings_data.user_can_move_messages_between_streams(); @@ -130,7 +129,6 @@ export function get_topic_popover_content_context({stream_id, topic_name, url}) stream_id: sub.stream_id, stream_muted: sub.is_muted, topic_name, - topic_muted, topic_unmuted, can_move_topic, can_rename_topic, @@ -141,7 +139,6 @@ export function get_topic_popover_content_context({stream_id, topic_name, url}) url, visibility_policy, all_visibility_policies, - development: page_params.development_environment, }; } diff --git a/web/src/recent_view_ui.js b/web/src/recent_view_ui.js index 098e29f95c..1247f1bdcb 100644 --- a/web/src/recent_view_ui.js +++ b/web/src/recent_view_ui.js @@ -471,7 +471,6 @@ function format_conversation(conversation_data) { // Stream info context.stream_id = last_msg.stream_id; context.stream_name = stream_data.get_stream_name_from_id(last_msg.stream_id); - context.stream_muted = stream_info.is_muted; context.stream_color = stream_info.color; context.stream_url = hash_util.by_stream_url(context.stream_id); context.invite_only = stream_info.invite_only; @@ -484,10 +483,6 @@ function format_conversation(conversation_data) { // We only supply the data to the topic rows and let jquery // display / hide them according to filters instead of // doing complete re-render. - context.topic_muted = Boolean(user_topics.is_topic_muted(context.stream_id, context.topic)); - context.topic_unmuted = Boolean( - user_topics.is_topic_unmuted(context.stream_id, context.topic), - ); context.mention_in_unread = unread.topic_has_any_unread_mentions( context.stream_id, context.topic, @@ -497,9 +492,8 @@ function format_conversation(conversation_data) { context.stream_id, context.topic, ); - // The following two fields are not specific to this context, but this is the + // The following field is not specific to this context, but this is the // easiest way we've figured out for passing the data to the template rendering. - context.development = page_params.development_environment; context.all_visibility_policies = user_topics.all_visibility_policies; // Since the css for displaying senders in reverse order is much simpler, diff --git a/web/src/settings.js b/web/src/settings.js index adba9980c8..a9c36016d2 100644 --- a/web/src/settings.js +++ b/web/src/settings.js @@ -109,7 +109,6 @@ export function build_page() { full_name: people.my_full_name(), date_joined_text: get_parsed_date_of_joining(), page_params, - development: page_params.development_environment, enable_sound_select: user_settings.enable_sounds || user_settings.enable_stream_audible_notifications, zuliprc: "zuliprc", diff --git a/web/src/settings_user_topics.js b/web/src/settings_user_topics.js index fb5223a36d..f0d6c90ade 100644 --- a/web/src/settings_user_topics.js +++ b/web/src/settings_user_topics.js @@ -3,7 +3,6 @@ import $ from "jquery"; import render_user_topic_ui_row from "../templates/user_topic_ui_row.hbs"; import * as ListWidget from "./list_widget"; -import {page_params} from "./page_params"; import * as scroll_util from "./scroll_util"; import * as settings_config from "./settings_config"; import * as user_topics from "./user_topics"; @@ -32,7 +31,6 @@ export function populate_list() { user_topic, user_topic_visibility_policy_values: settings_config.user_topic_visibility_policy_values, - development: page_params.development_environment, }; return render_user_topic_ui_row(context); }, diff --git a/web/templates/inbox_view/inbox_row.hbs b/web/templates/inbox_view/inbox_row.hbs index 7bf96d4712..b4e8a2780d 100644 --- a/web/templates/inbox_view/inbox_row.hbs +++ b/web/templates/inbox_view/inbox_row.hbs @@ -47,33 +47,21 @@
{{t "You will automatically follow topics that you have configured to both follow and unmute." }}
-{{t "You will automatically follow topics that you have configured to both follow and unmute." }}