@@ -16,7 +16,7 @@ void main() {
16
16
// These variables are the common state operated on by each test.
17
17
// Each test case calls [prepare] to initialize them.
18
18
late Unreads model;
19
- late PerAccountStore streamStore ; // TODO reduce this to ChannelStore
19
+ late PerAccountStore channelStore ; // TODO reduce this to ChannelStore
20
20
late int notifiedCount;
21
21
22
22
void checkNotified ({required int count}) {
@@ -37,10 +37,10 @@ void main() {
37
37
oldUnreadsMissing: false ,
38
38
),
39
39
}) {
40
- streamStore = eg.store ();
40
+ channelStore = eg.store ();
41
41
notifiedCount = 0 ;
42
42
model = Unreads (initial: initial,
43
- selfUserId: eg.selfUser.userId, streamStore : streamStore )
43
+ selfUserId: eg.selfUser.userId, channelStore : channelStore )
44
44
..addListener (() {
45
45
notifiedCount++ ;
46
46
});
@@ -157,11 +157,11 @@ void main() {
157
157
final stream2 = eg.stream (streamId: 2 , name: 'stream 2' );
158
158
final stream3 = eg.stream (streamId: 3 , name: 'stream 3' );
159
159
prepare ();
160
- await streamStore .addStreams ([stream1, stream2, stream3]);
161
- await streamStore .addSubscription (eg.subscription (stream1));
162
- await streamStore .addSubscription (eg.subscription (stream2));
163
- await streamStore .addSubscription (eg.subscription (stream3, isMuted: true ));
164
- await streamStore .addUserTopic (stream1, 'a' , UserTopicVisibilityPolicy .muted);
160
+ await channelStore .addStreams ([stream1, stream2, stream3]);
161
+ await channelStore .addSubscription (eg.subscription (stream1));
162
+ await channelStore .addSubscription (eg.subscription (stream2));
163
+ await channelStore .addSubscription (eg.subscription (stream3, isMuted: true ));
164
+ await channelStore .addUserTopic (stream1, 'a' , UserTopicVisibilityPolicy .muted);
165
165
fillWithMessages ([
166
166
eg.streamMessage (stream: stream1, topic: 'a' , flags: []),
167
167
eg.streamMessage (stream: stream1, topic: 'b' , flags: []),
@@ -177,10 +177,10 @@ void main() {
177
177
test ('countInStream/Narrow' , () async {
178
178
final stream = eg.stream ();
179
179
prepare ();
180
- await streamStore .addStream (stream);
181
- await streamStore .addSubscription (eg.subscription (stream));
182
- await streamStore .addUserTopic (stream, 'a' , UserTopicVisibilityPolicy .unmuted);
183
- await streamStore .addUserTopic (stream, 'c' , UserTopicVisibilityPolicy .muted);
180
+ await channelStore .addStream (stream);
181
+ await channelStore .addSubscription (eg.subscription (stream));
182
+ await channelStore .addUserTopic (stream, 'a' , UserTopicVisibilityPolicy .unmuted);
183
+ await channelStore .addUserTopic (stream, 'c' , UserTopicVisibilityPolicy .muted);
184
184
fillWithMessages ([
185
185
eg.streamMessage (stream: stream, topic: 'a' , flags: []),
186
186
eg.streamMessage (stream: stream, topic: 'a' , flags: []),
@@ -192,7 +192,7 @@ void main() {
192
192
check (model.countInStream (stream.streamId)).equals (5 );
193
193
check (model.countInStreamNarrow (stream.streamId)).equals (5 );
194
194
195
- await streamStore .handleEvent (SubscriptionUpdateEvent (id: 1 ,
195
+ await channelStore .handleEvent (SubscriptionUpdateEvent (id: 1 ,
196
196
streamId: stream.streamId,
197
197
property: SubscriptionProperty .isMuted, value: true ));
198
198
check (model.countInStream (stream.streamId)).equals (2 );
0 commit comments