Skip to content

Commit 95ff1e0

Browse files
committed
channel [nfc]: Rename StreamStoreImpl to ChannelStoreImpl
Fixes parts of #631
1 parent b2edc4a commit 95ff1e0

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/model/channel.dart

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import '../api/model/model.dart';
77
/// This type is useful for expressing the needs of other parts of the
88
/// implementation of [PerAccountStore], to avoid circularity.
99
///
10-
/// The data structures described here are implemented at [StreamStoreImpl].
10+
/// The data structures described here are implemented at [ChannelStoreImpl].
1111
mixin ChannelStore {
1212
Map<int, ZulipStream> get streams;
1313
Map<String, ZulipStream> get streamsByName;
@@ -72,8 +72,8 @@ mixin ChannelStore {
7272
/// Generally the only code that should need this class is [PerAccountStore]
7373
/// itself. Other code accesses this functionality through [PerAccountStore],
7474
/// or through the mixin [ChannelStore] which describes its interface.
75-
class StreamStoreImpl with ChannelStore {
76-
factory StreamStoreImpl({required InitialSnapshot initialSnapshot}) {
75+
class ChannelStoreImpl with ChannelStore {
76+
factory ChannelStoreImpl({required InitialSnapshot initialSnapshot}) {
7777
final subscriptions = Map.fromEntries(initialSnapshot.subscriptions.map(
7878
(subscription) => MapEntry(subscription.streamId, subscription)));
7979

@@ -92,15 +92,15 @@ class StreamStoreImpl with ChannelStore {
9292
forStream[item.topicName] = item.visibilityPolicy;
9393
}
9494

95-
return StreamStoreImpl._(
95+
return ChannelStoreImpl._(
9696
streams: streams,
9797
streamsByName: streams.map((_, stream) => MapEntry(stream.name, stream)),
9898
subscriptions: subscriptions,
9999
topicVisibility: topicVisibility,
100100
);
101101
}
102102

103-
StreamStoreImpl._({
103+
ChannelStoreImpl._({
104104
required this.streams,
105105
required this.streamsByName,
106106
required this.subscriptions,

lib/model/store.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ class PerAccountStore extends ChangeNotifier with ChannelStore, MessageStore {
226226
connection ??= globalStore.apiConnectionFromAccount(account);
227227
assert(connection.zulipFeatureLevel == account.zulipFeatureLevel);
228228

229-
final streams = StreamStoreImpl(initialSnapshot: initialSnapshot);
229+
final streams = ChannelStoreImpl(initialSnapshot: initialSnapshot);
230230
return PerAccountStore._(
231231
globalStore: globalStore,
232232
connection: connection,
@@ -272,7 +272,7 @@ class PerAccountStore extends ChangeNotifier with ChannelStore, MessageStore {
272272
required this.userSettings,
273273
required this.users,
274274
required this.typingStatus,
275-
required StreamStoreImpl streams,
275+
required ChannelStoreImpl streams,
276276
required MessageStoreImpl messages,
277277
required this.unreads,
278278
required this.recentDmConversationsView,
@@ -340,10 +340,10 @@ class PerAccountStore extends ChangeNotifier with ChannelStore, MessageStore {
340340
UserTopicVisibilityPolicy topicVisibilityPolicy(int streamId, String topic) =>
341341
_streams.topicVisibilityPolicy(streamId, topic);
342342

343-
final StreamStoreImpl _streams;
343+
final ChannelStoreImpl _streams;
344344

345345
@visibleForTesting
346-
StreamStoreImpl get debugStreamStore => _streams;
346+
ChannelStoreImpl get debugStreamStore => _streams;
347347

348348
////////////////////////////////
349349
// Messages, and summaries of messages.

0 commit comments

Comments
 (0)