Skip to content

Commit 4929412

Browse files
gnpricechrisbobbe
authored andcommitted
channel [nfc]: Document methods on ChannelStore
1 parent 5dab0a6 commit 4929412

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

lib/model/channel.dart

+27
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,36 @@ import '../api/model/model.dart';
99
///
1010
/// The data structures described here are implemented at [ChannelStoreImpl].
1111
mixin ChannelStore {
12+
/// All known channels/streams, indexed by [ZulipStream.streamId].
13+
///
14+
/// The same [ZulipStream] objects also appear in [streamsByName].
15+
///
16+
/// For channels the self-user is subscribed to, the value is in fact
17+
/// a [Subscription] object and also appears in [subscriptions].
1218
Map<int, ZulipStream> get streams;
19+
20+
/// All known channels/streams, indexed by [ZulipStream.name].
21+
///
22+
/// The same [ZulipStream] objects also appear in [streams].
23+
///
24+
/// For channels the self-user is subscribed to, the value is in fact
25+
/// a [Subscription] object and also appears in [subscriptions].
1326
Map<String, ZulipStream> get streamsByName;
27+
28+
/// All the channels the self-user is subscribed to, indexed by
29+
/// [Subscription.streamId], with subscription details.
30+
///
31+
/// The same [Subscription] objects are among the values in [streams]
32+
/// and [streamsByName].
1433
Map<int, Subscription> get subscriptions;
34+
35+
/// The visibility policy that the self-user has for the given topic.
36+
///
37+
/// This does not incorporate the user's channel-level policy,
38+
/// and is mainly used in the implementation of other [ChannelStore] methods.
39+
///
40+
/// For policies directly applicable in the UI, see
41+
/// [isTopicVisibleInStream] and [isTopicVisible].
1542
UserTopicVisibilityPolicy topicVisibilityPolicy(int streamId, String topic);
1643

1744
/// Whether this topic should appear when already focusing on its stream.

0 commit comments

Comments
 (0)