Skip to content

Commit 7b162b7

Browse files
committed
store [nfc]: Rename _streams to _channels
Fixes parts of #631
1 parent 628bfa2 commit 7b162b7

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/model/store.dart

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ class PerAccountStore extends ChangeNotifier with ChannelStore, MessageStore {
274274
assert(realmUrl == globalStore.getAccount(accountId)!.realmUrl),
275275
assert(realmUrl == connection.realmUrl),
276276
_globalStore = globalStore,
277-
_streams = channels,
277+
_channels = channels,
278278
_messages = messages;
279279

280280
////////////////////////////////////////////////////////////////
@@ -320,22 +320,22 @@ class PerAccountStore extends ChangeNotifier with ChannelStore, MessageStore {
320320
final Map<int, User> users;
321321

322322
////////////////////////////////
323-
// Streams, topics, and stuff about them.
323+
// Channels, topics, and stuff about them.
324324

325325
@override
326-
Map<int, Channel> get channels => _streams.channels;
326+
Map<int, Channel> get channels => _channels.channels;
327327
@override
328-
Map<String, Channel> get channelsByName => _streams.channelsByName;
328+
Map<String, Channel> get channelsByName => _channels.channelsByName;
329329
@override
330-
Map<int, Subscription> get subscriptions => _streams.subscriptions;
330+
Map<int, Subscription> get subscriptions => _channels.subscriptions;
331331
@override
332332
UserTopicVisibilityPolicy topicVisibilityPolicy(int channelId, String topic) =>
333-
_streams.topicVisibilityPolicy(channelId, topic);
333+
_channels.topicVisibilityPolicy(channelId, topic);
334334

335-
final ChannelStoreImpl _streams;
335+
final ChannelStoreImpl _channels;
336336

337337
@visibleForTesting
338-
ChannelStoreImpl get debugStreamStore => _streams;
338+
ChannelStoreImpl get debugStreamStore => _channels;
339339

340340
////////////////////////////////
341341
// Messages, and summaries of messages.
@@ -456,15 +456,15 @@ class PerAccountStore extends ChangeNotifier with ChannelStore, MessageStore {
456456
notifyListeners();
457457
} else if (event is StreamEvent) {
458458
assert(debugLog("server event: stream/${event.op}"));
459-
_streams.handleChannelEvent(event);
459+
_channels.handleChannelEvent(event);
460460
notifyListeners();
461461
} else if (event is SubscriptionEvent) {
462462
assert(debugLog("server event: subscription/${event.op}"));
463-
_streams.handleSubscriptionEvent(event);
463+
_channels.handleSubscriptionEvent(event);
464464
notifyListeners();
465465
} else if (event is UserTopicEvent) {
466466
assert(debugLog("server event: user_topic"));
467-
_streams.handleUserTopicEvent(event);
467+
_channels.handleUserTopicEvent(event);
468468
notifyListeners();
469469
} else if (event is MessageEvent) {
470470
assert(debugLog("server event: message ${jsonEncode(event.message.toJson())}"));

0 commit comments

Comments
 (0)