message lists: Don't allow user/topic mute message filtering independently.

This basically reverts 4bd7ec7c36 and
3a9dfc02e6.

The plan earlier was to have compeletely different codepaths
for user and topic muting, so that we could call seperate
functions in the message list class on receiving the respective
events.

However, this cannot be done, because if we, for example, on
receiving a `muted_users` event, filter `_all_items` based on
just user mutes, and store the result in `_items`, then, that
result may still contain topic-muted messages, which is
undesirable. Hence whenever we filter messages, we must do so
based on both user as well as topic muting.
(The code for the former will be added in further commits.)

So, we will have a single function which will handle updating
the message lists for muting.
This commit is contained in:
Abhijeet Prasad Bodas
2021-05-08 01:43:03 +05:30
committed by Tim Abbott
parent 2fc87ec644
commit e64e5936ce
5 changed files with 9 additions and 9 deletions

View File

@@ -73,7 +73,7 @@ run_test("basics", () => {
mld.remove([50]);
assert_contents(mld, [10, 15, 20, 25, 30, 35, 40, 45, 60, 70]);
mld.update_items_for_topic_muting();
mld.update_items_for_muting();
assert_contents(mld, [10, 15, 20, 25, 30, 35, 40, 45, 60, 70]);
mld.reset_select_to_closest();