Skip to content

Commit

Permalink
store: Add streams map
Browse files Browse the repository at this point in the history
Fixes: #136
  • Loading branch information
gnprice committed Jun 1, 2023
1 parent b2e0d91 commit 6b8ecb3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/model/store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,19 @@ class PerAccountStore extends ChangeNotifier {
.followedBy(initialSnapshot.realmNonActiveUsers)
.followedBy(initialSnapshot.crossRealmBots)
.map((user) => MapEntry(user.userId, user))),
streams = Map.fromEntries(initialSnapshot.streams.map(
(stream) => MapEntry(stream.streamId, stream))),
subscriptions = Map.fromEntries(initialSnapshot.subscriptions.map(
(subscription) => MapEntry(subscription.streamId, subscription))),
maxFileUploadSizeMib = initialSnapshot.maxFileUploadSizeMib;

final Account account;
final ApiConnection connection;

// TODO(#135): Keep all this data updated by handling Zulip events from the server.
final String zulipVersion;
final Map<int, User> users;
final Map<int, ZulipStream> streams;
final Map<int, Subscription> subscriptions;
final int maxFileUploadSizeMib; // No event for this.

Expand Down

0 comments on commit 6b8ecb3

Please sign in to comment.