@@ -191,6 +191,7 @@ void main() {
191191 await store.addSubscription (eg.subscription (stream2));
192192 await store.addSubscription (eg.subscription (stream3, isMuted: true ));
193193 await store.setUserTopic (stream1, 'a' , UserTopicVisibilityPolicy .muted);
194+ await store.setMutedUsers ([eg.thirdUser.userId]);
194195 fillWithMessages ([
195196 eg.streamMessage (stream: stream1, topic: 'a' , flags: []),
196197 eg.streamMessage (stream: stream1, topic: 'b' , flags: []),
@@ -200,7 +201,7 @@ void main() {
200201 eg.dmMessage (from: eg.otherUser, to: [eg.selfUser], flags: []),
201202 eg.dmMessage (from: eg.thirdUser, to: [eg.selfUser], flags: []),
202203 ]);
203- check (model.countInCombinedFeedNarrow ()).equals (5 );
204+ check (model.countInCombinedFeedNarrow ()).equals (4 );
204205 });
205206
206207 test ('countInChannel/Narrow' , () async {
@@ -274,12 +275,16 @@ void main() {
274275
275276 test ('countInDms' , () async {
276277 prepare ();
278+ await store.setMutedUsers ([eg.thirdUser.userId]);
277279 fillWithMessages ([
280+ // No one is muted: don't exclude
278281 eg.dmMessage (from: eg.otherUser, to: [eg.selfUser], flags: []),
282+ // Everyone is muted: exclude
279283 eg.dmMessage (from: eg.thirdUser, to: [eg.selfUser], flags: []),
284+ // One is muted, one isn't: don't exclude
280285 eg.dmMessage (from: eg.thirdUser, to: [eg.selfUser, eg.otherUser], flags: []),
281286 ]);
282- check (model.countInDms ()).equals (3 );
287+ check (model.countInDms ()).equals (2 );
283288 });
284289 });
285290
0 commit comments