Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
Revert "recent_topics: Set 'unread' and 'participated' as default filters."
Aman Agrawal79d829bda16a
diff --git a/frontend_tests/node_tests/recent_topics.js b/frontend_tests/node_tests/recent_topics.jsindex e43f859bb28..4d57dc8db0c 100644--- a/frontend_tests/node_tests/recent_topics.js+++ b/frontend_tests/node_tests/recent_topics.js@@ -302,8 +302,8 @@ run_test("test_recent_topics_launch", () => {// since they are generated in external libraries// and are not to be tested here.const expected = {- filter_participated: true,- filter_unread: true,+ filter_participated: false,+ filter_unread: false,filter_muted: false,search_val: '',};@@ -402,6 +402,7 @@ run_test('test_filter_unread', () => {rt.process_messages(messages);assert.equal(rt.inplace_rerender('1:topic-1'), true);+ $('#recent_topics_filter_buttons').removeClass('btn-recent-selected');global.stub_templates(function (template_name, data) {assert.equal(template_name, 'recent_topics_filters');assert.equal(data.filter_unread, expected.filter_unread);@@ -409,8 +410,7 @@ run_test('test_filter_unread', () => {return '<recent_topics table stub>';});- // This will deselect participated and leave only unread selected.- rt.set_filter('participated');+ rt.set_filter('unread');rt.update_filters_view();global.stub_templates(function (template_name, data) {@@ -475,13 +475,14 @@ run_test('test_filter_participated', () => {// remove muted filterrt.set_filter('muted');+ $('#recent_topics_filter_buttons').removeClass('btn-recent-selected');global.stub_templates(function (template_name, data) {assert.equal(template_name, 'recent_topics_filters');assert.equal(data.filter_unread, expected.filter_unread);assert.equal(data.filter_participated, expected.filter_participated);return '<recent_topics table stub>';});- rt.set_filter('unread');+ rt.set_filter('participated');rt.update_filters_view();diff --git a/static/js/recent_topics.js b/static/js/recent_topics.jsindex fb222d515e5..4b19c5c8557 100644--- a/static/js/recent_topics.js+++ b/static/js/recent_topics.js@@ -6,8 +6,7 @@ let topics_widget;// Sets the number of avatars to display.// Rest of the avatars, if present, are displayed as {+x}const MAX_AVATAR = 4;-// This variable can be used to set default filters.-let filters = new Set(['unread', 'participated']);+let filters = new Set();function get_topic_key(stream_id, topic) {return stream_id + ":" + topic.toLowerCase();