Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/model/store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -338,13 +338,15 @@ class CorePerAccountStore {
CorePerAccountStore._({
required GlobalStore globalStore,
required this.connection,
required this.queueId,
required this.accountId,
required this.selfUserId,
}) : _globalStore = globalStore,
assert(connection.realmUrl == globalStore.getAccount(accountId)!.realmUrl);

final GlobalStore _globalStore;
final ApiConnection connection; // TODO(#135): update zulipFeatureLevel with events
final String queueId;
final int accountId;

// This isn't strictly needed as a field; it could be a getter
Expand All @@ -370,6 +372,8 @@ abstract class PerAccountStoreBase {

ApiConnection get connection => _core.connection;

String get queueId => _core.queueId;

////////////////////////////////
// Data attached to the realm or the server.

Expand Down Expand Up @@ -456,13 +460,13 @@ class PerAccountStore extends PerAccountStoreBase with ChangeNotifier, EmojiStor
final core = CorePerAccountStore._(
globalStore: globalStore,
connection: connection,
queueId: queueId,
accountId: accountId,
selfUserId: account.userId,
);
final channels = ChannelStoreImpl(initialSnapshot: initialSnapshot);
return PerAccountStore._(
core: core,
queueId: queueId,
realmWildcardMentionPolicy: initialSnapshot.realmWildcardMentionPolicy,
realmMandatoryTopics: initialSnapshot.realmMandatoryTopics,
realmWaitingPeriodThreshold: initialSnapshot.realmWaitingPeriodThreshold,
Expand Down Expand Up @@ -500,7 +504,6 @@ class PerAccountStore extends PerAccountStoreBase with ChangeNotifier, EmojiStor

PerAccountStore._({
required super.core,
required this.queueId,
required this.realmWildcardMentionPolicy,
required this.realmMandatoryTopics,
required this.realmWaitingPeriodThreshold,
Expand Down Expand Up @@ -531,7 +534,6 @@ class PerAccountStore extends PerAccountStoreBase with ChangeNotifier, EmojiStor
////////////////////////////////
// Where data comes from in the first place.

final String queueId;
UpdateMachine? get updateMachine => _updateMachine;
UpdateMachine? _updateMachine;
set updateMachine(UpdateMachine? value) {
Expand Down